Skip to content

Commit

Permalink
[js:core] fix #2238 always same filename on upload with some iOS devices
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Oct 8, 2017
1 parent fb51833 commit 15b4412
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions js/elFinder.js
Original file line number Diff line number Diff line change
Expand Up @@ -5996,9 +5996,14 @@ elFinder.prototype = {
data.overwrite = 0;
formData.append('name[]', fm.date(fm.nonameDateFormat) + '.png');
}
if (fm.UA.iOS && file.name === 'image.jpg') {
data.overwrite = 0;
formData.append('name[]', fm.date(fm.nonameDateFormat) + '.jpg');
if (fm.UA.iOS) {
if (file.name.match(/^image\.jpe?g$/i)) {
data.overwrite = 0;
formData.append('name[]', fm.date(fm.nonameDateFormat) + '.jpg');
} else if (file.name.match(/^capturedvideo\.mov$/i)) {
data.overwrite = 0;
formData.append('name[]', fm.date(fm.nonameDateFormat) + '.mov');
}
}
}
if (file._chunk) {
Expand Down

0 comments on commit 15b4412

Please sign in to comment.