I have implemented the Cookbook Contact Form with attachments and I am able to attach a .HEIC 1MB file from my laptop. I receive the email with the attachment.
When I test the contact form on my iPhone 8 and I attach the same .HEIC photo from Photos, I receive the “File could not be uploaded” message. A .jpg attached goes through ok.
I do not know where to check to understand the error or to resolve this.
Are you sure you have uploaded a HEIC to the form and it’s not auto-converted to JPEG by your laptop?
HEIC isn’t supported by most servers. In theory you could support it but then have to adjust server settings (doesn’t work on normal hosting plans) and then convert before using on the website. So that’s why it doesn’t work.
What is a bit weird though is that iOS usually converts such HEIC photos to JPEG for better compatibility and to support the upload to websites as you wanted to do. Maybe there’s an iOS setting where this is disabled? And maybe your laptop has a similar setting but it’s set to different values?
Thank you for your suggestion. I am abandoning figuring this out for now and simply opening an email to myself for anyone who wants to add attachments.
I am not around other developers, maybe because I’m 72. My friends’ eyes glaze over whenever I mention anything about coding and they look around for someone else to talk to.
My stepdaughter’s partner is quite the developer and I’ll go over this with him next time we get together.
I do appreciate you taking the time and I’ll track down your own theories and see if it leads me to a better answer.