Open Teetrinker opened 8 years ago
Can anyone reproduce this?
Yes, I can confirm this. Every uploaded file ist renamed to "image.jpg" and overwrites each other.
This is the default behaviour if you are on iOS due to security reasons. The image name is 'image.jpg' for every image since it is only a database object on an iOS device. As far as I know one should create an individual file name by yourself (e.g. the upload function), especially on chunked uploads.
I personally think that this issue could either be handled via an external library (like https://github.com/blueimp/jQuery-File-Upload, for example) or by Contao itself.
@contao/developers /cc
How about never overwriting files via the upload and instead append a number until the file name is available? This would create image.jpg, image-2.jpg, image-3.jpg.
In order to still be able to replace a file we could add a “replace file” button for files.
How about never overwriting files via the upload and instead append a number until the file name is available? This would create image.jpg, image-2.jpg, image-3.jpg.
In order to still be able to replace a file we could add a “replace file” button for files.
Related: contao/contao#5388
As discussed in Mumble on April 21st, we should add numeric suffixes if there are multiple files with the same name in a request.
As discussed in Mumble on April 21st, we should add numeric suffixes if there are multiple files with the same name in a request.
But this won't fix this part of the issue:
When a file is selected for upload, the upload happens, the green tick is shown, but the file is named "image.jpg" and replaces the pre-existing "image.jpg"
If you upload images one by one into a folder with the Contao uploader with an iOS device, only one image will remain.
We cannot fix this. You will have to upload an image, rename it, then upload the next one, rename it, and so on.
Contao 3.4.4 iOS9.1 uf iPhone und iPad mini PHP 5.4.32 When a file is selected for upload, the upload happens, the green tick is shown, but the file is named "image.jpg" and replaces the pre-existing "image.jpg". Also, if multiple images are uploaded, only the last one persists.
(It was not possible to test this case in the demo.contao.org because of the upload restrictions.)