Uploading files with dots in filename throws error
Author | Posts |
---|---|
July 11, 2014 at 2:23 pm 23345 | |
Sekander Badsha | When I'm trying to upload a file with a filename like: 2014-07-10 20.17.57.jpg I get a Javascript error: Uncaught ReferenceError: res is not defined upload.js?ver=3.9.1 137 This only happens when the file has dots in the filename. Could this be fixed? |
July 12, 2014 at 6:04 pm 23384 | |
Sekander Badsha | Files are not intended to name like this. Because extension of a file is defined like .exe, .mp3, .jpg – so you can’t place dots in a file name. Its illogical. |
July 14, 2014 at 3:40 pm 23513 | |
Menno | Hi Sekander. I know it’s not common to include dots in a filename but any other user doesn’t know this. Since this is a a plugin for users to post frontend content I think your argument that it’s illogical doesn’t make any sense, a normal user without any knowledge of filenames and uploading doesn’t have any idea why the script is breaking down. It’s common for a script to catch these errors and deal with them. To not at least give an error to the end user is just bad coding. |
July 14, 2014 at 9:59 pm 23547 | |
pjeaje | Maybe in your upload description write “Your images must follow the following format…. “ |
July 15, 2014 at 5:11 pm 23609 | |
Sekander Badsha | Hello Menno, |
July 18, 2014 at 9:05 pm 23752 | |
Menno | The error is: Uncaught ReferenceError: res is not defined. This is normal because you have commented out // var res = $.parseJSON(response.response); on line 128. But response.response gives ‘error’. |
July 21, 2014 at 12:57 pm 23851 | |
Sekander Badsha | We have tried several times and we couldn’t reproduce the issue. Please give us your site credentials as private reply. We’d like to inspect the problem. |