Is there any functionality, or additional module that will compress file uploads via webform? E.g. attach an image style to the file upload so it compresses and optimises on upload.

My webform is here and uses default file upload functionality http://www.dcpv.co.uk/site/welcome-our-line-service.html

As it is, especially as there are over 10 files to upload, its open to a timeout if someone uploads files that are large, which will prob be the case as most users will be uploading straight off camera, i would imagine, and asking to optimise before upload would be a big ask i think, so... i would like to be able automatically to decompress and optimise on upload

is there anything out there that will do this? is there any way of attaching an image style?

Comments

mattys’s picture

bumping this up in the hope that i will get some kind of response, even if it is only to tell me to bugger off

seems like a fairly straight forward question though... and quite handy to know i would imagine...

vernond’s picture

I don't think there is anything we can do from Webform that will cause the client browser to compress files before transmitting them to the web server.

mattys’s picture

oh, ok, thanks vernond, i thought being able to have more control over files uploaded would been a great function, everything is available to hook into, e.g. image styles, etc.

quicksketch’s picture

You can do this with custom code through hook_file_insert(), but such coding questions are outside the scope of the Webform issue queue.

http://api.drupal.org/api/drupal/modules%21system%21system.api.php/funct...

quicksketch’s picture

Status: Active » Fixed

As it is, especially as there are over 10 files to upload, its open to a timeout if someone uploads files that are large, which will prob be the case as most users will be uploading straight off camera, i would imagine, and asking to optimise before upload would be a big ask i think, so... i would like to be able automatically to decompress and optimise on upload

Actually if you want to optimize *before* the upload, @vernond is right that there's nothing we can do to compress them beforehand. However you can compress them afterwards by using hook_file_insert() like I mentioned above. The next version of Webform (3.16) also includes AJAX-uploading with a progress bar in D7, so that might help reduce the timeout problem you may be experiencing.

I'm marking this fixed as a support request.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.