Raise the form's upload limits sensibly, state them beside the field, rename every photo with a unique name the moment it arrives, store uploads privately, and test two requests in a row from an iPhone.

Photos that never reached the inbox

A contractor's quote form has always had a field for a photo of the job, and until this autumn no iPhone could use it.

Now photos come with many requests. Some mention a picture that never came, a few customers call about requests that never arrived, and an older one now shows somebody else's deck.

Each of these has a cause in how the form receives the file, and each is fixed on the server, not on the customer's phone.

The upload button that came alive with iOS 6

Before iOS 6, Safari on iPhones and iPads could not upload files. A form's upload button sat greyed out, and customers had to email photos separately, if they bothered.

Since iOS 6 arrived on September 19, the same button offers to take a photo or choose one already on the phone, and the form sends it with everything else.

A picture of the job often says more than a paragraph. The change also means a form built years ago, never tested with photos, now receives them.

The path a photo takes

A photo passes several limits between the customer's phone and your inbox, and any of them can drop it.

When one file breaks the limit per file, the server drops that file and passes on the rest. When the whole submission breaks its limit, the server discards everything, text included, and the script receives an empty form.

Every photo is called image.jpg

Safari on an iPhone sends every photo with the same name: image.jpg. It does not use the name the camera gave the file.

A form that saves uploads under their original names, in one folder, writes each new image.jpg over the last. The email for an earlier request still links to that file, which now shows the newest customer's photo.

The overwrite gives no sign. Nothing fails, and the mix-up shows only when someone opens an older request and sees the wrong job.

Limits chosen on purpose

Default limits were set long before phones took photos this size. Raise them deliberately, with your host or developer, to fit a few phone photos per request with room to spare.

Not without bounds, though. A form that accepts any size invites huge files that fill your hosting space and slow a shared server.

Then state the limit beside the field in plain words, such as up to three photos straight from a phone, and offer an email address for anything larger.

A worked example

A mobile mechanic in Williams Lake works from a van, doing brakes, batteries and diagnostics at customers' homes and job sites. His booking form asks for the vehicle, the problem and a photo.

Since October, customers have been attaching photos of warning lights, leaks and worn tires from their iPhones. Two problems showed up within a few weeks.

Several requests said see photo, and none was attached. Each of those photos was over the server's limit for one file, so the form arrived without it and no one was told.

Worse, two requests a day apart showed the same leaking pickup. Both photos had been saved as image.jpg, so the second replaced the first, and the earlier email now linked to it.

His developer raised the limits with the host, set the form to rename each photo on arrival with the request number and time, and made it refuse files that are not images.

A name that no other upload can share leaves nothing for a later photo to land on, and the request number ties every picture to the right vehicle.

Renaming on arrival

Never trust the name a file arrives with. Give each upload a new name the moment it lands, built from the date, the time and a number unique to that request.

Keep an ending such as .jpg only after checking that the file really is a photo. A file called image.jpg can contain anything, so the server should look inside it, not at the name.

If the notification email carries the photo, use the new name there too, so email and file can be matched months later.

Customers' photos stay private

Photos of a customer's car, driveway or home are personal information. Saved in a public folder with a predictable name, they can be found by anyone who guesses the pattern.

Store uploads where the public cannot browse them, or in a folder that refuses to list its contents or run scripts. Delete them once the job and its paperwork are done.

A form that accepts files also invites attempts to upload something harmful, one more reason to accept images only.

A clear message when something fails

When a photo is too large, the customer should hear so at once, with the text they typed still on the screen. A form that empties itself loses the request entirely.

The thank-you page should confirm what arrived, such as two photos received. A customer who sees that knows not to send the pictures again by email.

The counter-case

Plenty of businesses rarely need a photo before quoting. A bookkeeper or a piano teacher gains little from an upload field, and a form without one has fewer ways to fail.

For them, dropping the field is reasonable, provided the form still works on a phone and says where to send a picture when one would help.

Any form that keeps the field, however, should handle the photos iPhones now send. A button that looks as if it works but loses files is worse than no button.

A test from the customer's side

  1. Take a photo with an iPhone running iOS 6.
  2. Attach it to the form over a cell connection.
  3. Send a second request with another photo straight after.
  4. Check that both arrived with the right pictures.
  5. Try a photo larger than the stated limit.
  6. Read the message the customer sees when it fails.
  7. Confirm the uploads are renamed and stored privately.

Step three is the test that catches the overwrite. One upload looks fine; only a second image.jpg, arriving after the first, shows whether the form overwrites.

Another way a form can throw away what a visitor typed, a session that runs out before Submit, gets its own treatment in a long application form that loses everything on submit.


Frequently asked questions

Why could iPhone owners not attach photos before?

Before iOS 6, Safari on iPhones and iPads did not support file uploads, so upload buttons appeared greyed out. Since September 19, those buttons work.

Why do some photos arrive missing?

A photo over the server's limit for one file is dropped while the rest of the form arrives. Many PHP servers set that limit at 2 MB by default.

Can a large photo lose the whole request?

Yes. If the text and files together exceed the limit for one submission, the server discards everything, and the form script receives nothing at all.

Why is every iPhone photo named image.jpg?

Safari on the iPhone sends each photo under that name rather than the camera's own file name. The form has to give every upload a unique name on arrival.

What limit should the form state?

One that fits a few photos straight from a phone, agreed with your host. Say it beside the field and offer email for anything larger.

Do Android phones have the same problem?

Android phones have handled uploads for longer, usually keeping the camera's file names. Size limits apply to every phone, so test with any you can borrow.

West Coast Media Solutions Inc. provides web design, web development, hosting, digital marketing, and business consulting to organisations across Canada, drawing on more than twenty-five years in the field.

Photos going missing from your quote form?

Share the address of the form with us, and we will test it from an iPhone and explain each change it needs.

Start a Conversation