FileUpload of fresh photos from iPhone/IPad not working in sequence
Bug Report
Prerequisites
- [x] Can you reproduce the problem in a MWE?
- [x] Are you running the latest version?
- [x] Did you check the FAQs to see if that helps you?
- [x] Are you reporting to the correct repository?
- [x] Did you perform a search in the issues?
For more information, see the CONTRIBUTING guide.
Versions
1.5.0
Description
When using the upload components, taking a fresh photo to upload with iPhone/iPad, file is always uploaded with the name image.jpg and the component thinks every subsequent photo is the same => No second upload happens.
Steps to Reproduce
- Open Precise-UI KitchenSink on an apple mobile device
- Click update, choose take a photo option
- Take a photo and upload it
- Repeat step 3
Expected behavior: Second photo is uploaded.
Actual behavior: nothing happens.
Environment details: Every Browser as long as the device is an Apple iPhone/iPad
Possible Solution
Possible solution is to extend the push function inside the FileUploader component. If this function notices the used platform is iPad and iPhone and the file is called image.jpg (Files from gallery are always under different name, which the user has no control of) rename the file to something else. One possible solution is to stringify the file.lastModified value and use it as file name.