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.

Alter uploaded file names

  1. Hey folks,

    We've a form that requires an upload for members to submit paperwork; usually a PDF, sometimes a graphics file. They're customers, so what they call it and send it as is unpredictable.

    Our site is on a VPS, so I'm not sure where I'd add a hook for this. I want to strip out any weird characters. The uploaded file becomes a link for our associates, so it can't have any goofy characters in it. Or, instead of just stripping them, it could replace them with the right HTML code ( # becomes %23, spaces to %20, etc.). What's the best way of doing this?

    http://www.phillycarshare.org/gas-reimbursement-form

    Thanks!

    Posted 13 years ago on Friday March 25, 2011 | Permalink
  2. It doesn't appear as if we have a hook for this yet. We have a hook for setting the file permission and a hook for setting the upload path but I don't think we have a hook for dynamically setting the file name. We will get this hook added to the 1.5.1 release and add it to the documentation when it is done.

    Posted 13 years ago on Friday March 25, 2011 | Permalink

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