Home Forums Plugin Support WP User Frontend Pro Uploading files with dots in filename throws error

This topic is: resolved

Tagged: 

This topic contains 6 replies, has 3 voices, and was last updated by  Sekander Badsha 4 years, 10 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #23345

    Menno
    Member
    Post count: 2

    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?

    #23384

    Sekander Badsha
    Member
    Post count: 2067

    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.

    #23513

    Menno
    Member
    Post count: 2

    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.

    #23547

    pjeaje
    Member
    Post count: 12

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

    #23609

    Sekander Badsha
    Member
    Post count: 2067

    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.

    #23752

    Menno
    Member
    Post count: 2

    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'.

    #23851

    Sekander Badsha
    Member
    Post count: 2067

    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 7 posts - 1 through 7 (of 7 total)

The topic ‘Uploading files with dots in filename throws error’ is closed to new replies.