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.

Filter for processing image file uploads?

  1. LumpySimon
    Member

    Hello

    I'd like to use the wp_create_thumbnail function to resize images after upload (these are normal image uploads, not post images), but I can't figure out how I can use GF hooks to get the details of the uploaded image.

    Is it possible to somehow find out the path & filename of an uploaded image after it has been successfully uploaded so I can then make whatever changes I want to it?

    Thanks!

    Posted 12 years ago on Thursday March 15, 2012 | Permalink
  2. You can use the gform_pre_submission hook or the gform_after_submission hook to execute custom code and access form field data.

    You should be able to get the full path to the file that is uploaded by getting that fields value via those two hooks. The full http path to the file is stored as the value of the file upload field.

    So using one of those two hooks you could execute any custom code you want and should be able to accomplish what you describe as long as you know how to properly write the custom PHP necessary to put the wp_create_thumbnail function to use.

    Posted 12 years ago on Tuesday April 3, 2012 | Permalink

This topic has been resolved and has been closed to new replies.