How do I get the Path to a uploaded file?

  • Profile Image
    AMAPED
    Asked on February 11, 2012 at 06:32 PM

    How do I get the Path to a uploaded file? It is not present in the $_POST array



    This is a re-post of a comment on How to Post Submission Data to Thank You Page

  • Profile Image
    liyam
    Answered on February 12, 2012 at 12:03 AM

    The post data does not show the URL path of the uploaded file, but you can manually do this by encoding the path manually:

    http://www.jotform.com/uploads/your_username/your_form_id/{$submission_id_var}/{$filename_var}

    Note:  The fonts in red are those that you will need to find the details from your account or your form. These are to be hardcoded.  While those in green, you can get it from the data being posted by your $_POST vars, so just getting the variables will do fine.

    If you need further assistance regarding this, please let us know.

    Thanks.

  • Profile Image
    AMAPED
    Answered on February 12, 2012 at 10:27 AM

    Hi,

     

    Thanks I saw that but there was somekind of a bug because the filename was not present in the array, the second time I submitted the form it was there.

     

    Now it is working really well, thanks for your advice.

  • Profile Image
    pinoytech
    Answered on February 12, 2012 at 10:34 AM

    Hi,

    Good to hear that your form now is working well. Thank you for using and trusting JotForm!