Uploaded File Link Error - Bad URL!

  • rpjostform1
    Asked on July 20, 2017 at 4:34 PM

    If you use the "File Upload" input in a form...

    If an uploaded file has white (empty) spaces in the file name...

    In the Submissions's Page Top Pane display of this uploaded file, the link for this file is not properly coded/formatted to allow for a user to COPY/PASTE this link.  (*See image)

    FYI:  I am using image files for my File Upload input, but the type of file should not affect this issue.

     

    Uploaded File Link Error   Bad URL! Image 1 Screenshot 20

     

    Thanks.

  • aubreybourke
    Replied on July 20, 2017 at 5:13 PM

    The link for the image is URL encoded.

    However if you just copy the filename it will be decoded:

    Uploaded File Link Error   Bad URL! Image 1 Screenshot 20

     

    Note that you can encode a URL manually:

    Pass Value to Another Form with URL Encoding

    So if you did want to use a variable (say in an email for example) with spaces, where the variable name is {image}, you can encode it as {URLENCODE:image}

     

  • rpjostform1
    Replied on July 20, 2017 at 9:54 PM

    So...

    if you COPY the link as you've done, and then paste that link directly into an email, it will function correctly?  It will allow the recipient of the email to access the image file without any issues?  ... that does not involve using a text editor to decode the link?

    FYI:  This issue is not related to $_POST, etc.  Simply a novice that wants to COPY/PASTE the link (by right-clicking to COPY/PASTE) and then sending that link to another person via email.

     

    FYI:  This is the specific Submission ID in question: 3763777922852112961

     

    Thanks.

  • liyam
    Replied on July 21, 2017 at 3:03 AM

    Yes, the URL encoded link should be no problem even if you paste the link to the email as long as you allow everyone to have access to your file. 

    Note: If you have enabled the file access restriction setting on your account, the user will not be able to download the file.

    Uploaded File Link Error   Bad URL! Image 1 Screenshot 20

    There should be no problem copy-pasting the code whether it is URL encoded or not. Even if you copy the link to the file and paste it into an address bar of the browser, it will automatically encode the values that needed to be encoded and should lead you to download the file.

    It does not require a text editor to format anything. Even if you have the unencoded name of the file, the browser will still convert this to URL encoded version in order to get the proper link to the file server.

    Here's an example, just copy and paste this link to your browser's address bar and it should prompt you for a download:  https://www.jotform.com/uploads/rpjostform1/71655247184158/3763777922852112961/GREG%20PR%20PHOTO%20JULY%202016%20(1).jpg