Page 1 of 1

iphones/ipads can only upload a single image

Posted: 17 Jun 2013, 21:37
by chrisjclay
Hi,

I just discovered that iOS names each photo "image.jpg" during upload by Safari, so _ _/_ _ users get a "file exists" error when trying to add a second photo to any Phoca Gallery. I'm wondering if there's a bit of code that could be added that would rename each image during upload, perhaps by appending the date and time? For example, the renamed file would then look something like "image-20130616-140010.jpg".

Is this something that could be fixed in a future version of Phoca Gallery, or could someoneone advise me on how I could customize the code myself? I'm wondering if I could do it via a template override - so far, I've found the single upload form in views/category/default_uploadform.php. I see the form itself in the file, but I'm not sure how I could add a function to rename the images during transfer. Hopefully the same thing can be done for the HTML5 uploader, for multiple upload support on iOS devices.

Any help would be greatly appreciated :)

Chris

Re: iphones/ipads can only upload a single image

Posted: 20 Jun 2013, 18:35
by Jan
Hi, for now really no idea why the ios should do such thing? I am testing it in Safari on Win and get no such problem. The problem with fixing is, there is nothing to fix in Phoca Gallery :-( as this problem, seems to, has no dependency to the extension or Joomla! ... Really no idea (never seen such problem) about this problem and really no idea why should some OS do such non-sense behaviour.

Re: iphones/ipads can only upload a single image

Posted: 20 Jun 2013, 19:18
by chrisjclay
Yes, it's strange that Apple would choose to do rename all images to "image.jpg" if they're being uploaded in mobile Safari...! I've found other people reporting the same issue in many other software forums:

www .jotform.com/answers/212492-multiple-iOS-Image-Uploads-overwrite-each-other
www .tinymce.com/forum/viewtopic.php?pid=107635
github.com/moxiecode/plupload/issues/623

I guess it shouldn't be considered a "bug" in Phoca Gallery, but with so many people using iPads and iPhones now, it would be wonderful if Phoca Gallery was mobile friendly. I was hoping it wouldn't take much to add a bit of code so that each image gets a unique filename during upload. As I suggested above, simply adding the current times to the filenames would then allow iOS users to upload images. This would also help desktop users too, since people could then upload photos with common names like "image5.jpg" without getting any "file already exists" errors.

Cheers,
Chris