Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2015-07-02 Thread Sujata Aghor
My code( based on your mentioned solution) looks like this- if form.accepts(request.vars): if hasattr(request.vars, 'txn_doc'): #if len(request.vars.txn_doc) 0: files = request.vars['txn_doc'] if not

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2015-07-02 Thread Sujata Aghor
IN other words I want to do form.process(...).accepted in the for loop for no. of files uploaded. On Thursday, July 2, 2015 at 12:26:09 PM UTC+5:30, Sujata Aghor wrote: My code( based on your mentioned solution) looks like this- if form.accepts(request.vars):

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2015-06-10 Thread Sujata Aghor
Hello Calvin, Does this mentioned solution any way related with - jQuery-File-Upload http://www.google.com/url?q=http%3A%2F%2Fblueimp.github.io%2FjQuery-File-Upload%2Fsa=Dsntz=1usg=AFQjCNEEktmpqUGzon_Ac9ma6vqeBRfUYQ ??? When I implemented it, it is not allowing me to upload multiple files via

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-09 Thread Calvin Morrison
Brando, Thanks for working this out! it would be good to make a web2py slice or add it to the documentation/ examples Calvin On 8 January 2014 14:35, Brando bhe...@trustcc.com wrote: This works, added the requires statement for form validation: def submit(): import datetime form =

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-09 Thread Brando
Calvin, I have a few other things I want to work out, but I'm going to start a new thread with a more relevant title. On Thursday, January 9, 2014 10:10:04 AM UTC-8, Calvin Morrison wrote: Brando, Thanks for working this out! it would be good to make a web2py slice or add it to the

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
I just wrote my own way to do it yesterday which worked great. I would love it to go upstream. It's just a standard file upload with the multiple attribute. here's the entire thing: it spits out a form. my db looks like this: db.define_table('uploads', Field('username', 'string'),

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Calvin, you are awesome. I will try this on my end and report back. On Wednesday, January 8, 2014 7:18:28 AM UTC-8, Calvin Morrison wrote: I just wrote my own way to do it yesterday which worked great. I would love it to go upstream. It's just a standard file upload with the multiple

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
:-) I was having a hell of a time trying to get all the AJAX examples to work and well, none of it f***ing would. Yesterday I brewed an extra strong pot of coffee and cranked this out. Some of the code i would like review on, I am not sure how to properly check for if there was an uploaded file

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Also, should it be possible to adapt this so that I could use SQLFORM.factory instead of FORM? I notice this uploads the files to the db. What would need to change so that I'm just pulling it to the local disk? On Wednesday, January 8, 2014 7:18:28 AM UTC-8, Calvin Morrison wrote: I

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
instead of inserting it, you could write the file stream out to whereever you want. It's really just a python cgi module object. so you can use all corresponding documentation to help look at this SO answer

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Calvin, i stripped out a variable or two, but it appears to work great. I'm getting a crazy twitch trying to figure out a javascript/ajax solution for this. I second the idea of building this into Web2py, I would be more than happy to contribute, but I'm just starting out with web2py and I

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
Yes I am getting that same problem here. Like I said, I don't really know how to properly test if the variable has been set. Any input from more wise web2pyers would be great Calvin On 8 January 2014 14:03, Brando bhe...@trustcc.com wrote: Calvin, I'm getting this error when I select only 1

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Calvin, I'm getting this error when I select only 1 file to upload: Traceback (most recent call last): File /Volumes/BrandonsData/Google Drive/web2py/web2py.app/Contents/Resources/gluon/restricted.py, line 217, in restricted File /Volumes/BrandonsData/Google

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
I removed that if loop completely and it works fine now: def submit(): import datetime form = FORM(LABEL(File(s):), INPUT(_name='up_files', _type='file', _multiple=''), BR(),INPUT(_type='submit')) # if hasattr(request.vars, 'up_files'): # form.process() if

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Dave S
On Wednesday, January 8, 2014 11:07:03 AM UTC-8, Brando wrote: I removed that if loop completely and it works fine now: The next obvious question: did you test with no files? To deal with those of us who click too fast? /dps -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
I'm working on that now. if anyone beats me to it please post the solution. On Wednesday, January 8, 2014 11:23:21 AM UTC-8, Dave S wrote: On Wednesday, January 8, 2014 11:07:03 AM UTC-8, Brando wrote: I removed that if loop completely and it works fine now: The next obvious question:

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
This works, added the requires statement for form validation: def submit(): import datetime form = FORM(LABEL(File(s):), INPUT(_name='up_files', _type='file', _multiple='', requires=IS_NOT_EMPTY()), BR(),INPUT(_type='submit')) if form.accepts(request.vars, formname=form):

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Question, how could I make it so I don't have to click the submit button. How could i make it to where they choose the files and it auto submits it? On Wednesday, January 8, 2014 11:35:44 AM UTC-8, Brando wrote: This works, added the requires statement for form validation: def submit():

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
that'd be a Jquery thing. jQuery(input#fileid).change(function () { alert(jQuery(this).val()) }); On 8 January 2014 14:36, Brando bhe...@trustcc.com wrote: Question, how could I make it so I don't have to click the submit button. How could i make it to where they choose the files and