Up to 50 percent off

Uploading files with dots in filename throws error

This topic contains 6 reply and 3 voices, and was last updated by Sekander Badsha 10 years, 4 months ago
Viewing 6 Posts - 1 through 6 (of 6 total)
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 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 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 pjeaje

Maybe in your upload description write “Your images must follow the following format…. “

July 15, 2014 at 5:11 pm 23609
Sekander Badsha Sekander Badsha

Hello Menno,
I have tested a file with with some dots in it. And tried in both ways – file upload and attach to post, and both of them worked fine without showing any error. Can you give us a screenshot of the error ? You can upload the screenshot anywhere in the web and give the link here.

July 18, 2014 at 9:05 pm 23752
Menno 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 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.

Viewing 6 Posts - 1 through 6 (of 6 total)