Thanks Paolo,
your code helped me a lot resolving my multi-document upload requirement.

I had to tweak it a bit, like photo title was empty if I did not specify one- I 
just used element.filename in those cases

document_name =element.filename if not element.name.split(":")[-1] else 
element.name.split(":")[-1]

Great stuff, thanks!

milan





On Friday, 28 October 2011 01:40:12 UTC+1, Paolo Caruccio  wrote:
> I wasn't able to find in the web, even in this group, a multiple files upload 
> system with the followings requirements:
> 
> 
> - upload the files together with form submit
> - no frame, no flash, no ajax form submit but only jquery and python
> - give a title to the uploading files
> - simple to integrate and control in web2py 
> 
> 
> so, inspired by 
> http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element/,
>  I wrote one by my self.
> It's minimalist and the code isn't optimized (I'm not a programmer), but it 
> works for my purposes.
> 
> 
> If you would like to test it in default welcome web2py app:
>  - put jquery.multiuploads.js in static/js folder
>  - put multiuploads.css in static/css folder
>  - append the functions to default.py in controllers folder
>  - append the table definition to db.py in models folder
>  - put upload_documents.html in views folder
> 
> 
> You'll find some comments in the code and also many errors.
> 
> 
> I look forward to your suggestions and opinions.
> 
> 
> Ciao.
> 
> 
> Paolo

-- 



Reply via email to