PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

upload file to post

  1. I figured out how to insert an upload a picture element that uploads a picture to a post in wordpress
    But now i need to add 'upload a file' where this file would be linked to a custom field in a post.
    i don't see this possibility...
    or am i missing something?

    i bought gravityform because of the decent implementation and especially for this use. so it would be a pity not to have it after all...

    Posted 13 years ago on Wednesday May 26, 2010 | Permalink
  2. It could be possible using one of the hooks to get the file path for the uploaded file and then populate the custom field value with it. How comfortable are you with PHP?

    Posted 13 years ago on Wednesday May 26, 2010 | Permalink
  3. not too comfortable.
    any suggestions might help...
    (i can copy and paste, and i understand, but writing itself is not that easy...)

    Posted 13 years ago on Thursday May 27, 2010 | Permalink
  4. Hi Carl,

    Could you give an example of how to obtain the file path for the uploaded file with PHP?

    Posted 13 years ago on Monday September 27, 2010 | Permalink
  5. @kenboer if you are trying to populate a custom field with the full path to an uploaded file then you no longer need to use code for this. You add a Custom Field to your form and you select "File Upload' as it's field type. It will then act as a file upload field and populate the custom field value with the full path to the file that is uploaded.

    Posted 13 years ago on Monday September 27, 2010 | Permalink
  6. Excellent. Thanks.

    Posted 13 years ago on Monday September 27, 2010 | Permalink
  7. steverose
    Member

    Carl, thank you for the tip. This solution makes it very easy to attach the url of an uploaded file.

    Posted 13 years ago on Monday April 11, 2011 | Permalink