Jump to content

Form upload multiple file types


opalepatrick
 Share

Recommended Posts

Hi there I have been using soma's form-process.php to sort out uploading images and form details to create pages and it works great.

However, I now want to extend it so that I can allow mixed allowed extensions like txt, csv as well as image files to be uploaded. (to allow designers etc to upload project files) - I don't however need to see the files or images, but just create a link in the created pages to let me download them from the created directory so that I can process/view them.

Second part would be to get an email heads up (less of an issue), then do a drag and drop front end. Get there eventually.

Any pointers or help that didn't need me to roll back too much would be great.

Link to comment
Share on other sites

@opalepatrick

Not everyone knows of Soma's form-process.php. It would have been good to provide a link and/or some code. Secondly, if that link is a thread in the forums, then it would actually be better to post your question on that thread rather than start a whole new topic - it helps with context and continuity..

  • Like 2
Link to comment
Share on other sites

I now want to extend it so that I can allow mixed allowed extensions like txt, csv as well as image files to be uploaded. (to allow designers etc to upload project files) ......

You can add the file extension types you want in the array on line #35 of the code.

$file_extensions = array('jpg', 'jpeg', 'gif', 'png');

I don't however need to see the files or images, but just create a link in the created pages to let me download them from the created directory so that I can process/view them.

Not getting this fully. You want to create a link where? Somewhere on the front end of your website or in the admin/backend? 

Drag and Drop: That's most likely a jQuery plugin. There's a number out there, I can't recommend any since I haven't used them.

As for a thread about Soma's form, I can't recall seeing any. His blog post here might also be of some help RE flexible downloads.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...