[web2py] Re: Get files from string

2019-02-27 Thread Константин Комков
Leonel Câmara, thank you! In controller: > i = 0 > while i < len(request.vars.files): > db_app.doc_images.insert(file=request.vars.files[i]) > i += 1 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - h

[web2py] Re: Get files from string

2019-02-26 Thread Leonel Câmara
You should append the files directly to formdata instead of pushing them into the endUserFiles and appending an array. It's ok to put multiple values in the same key in formdata using append for (var i = 0;ihttp://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web

[web2py] Re: Get files from string

2019-02-26 Thread Константин Комков
Leonel Câmara, yes I have. Difference in topic before I sent only files in FormData, now I send variables email, phone and variable files which contain js array - endUserFiles. > > Ajax function: > jQuery.ajax({ > type: "POST", > url: "loadDocs", > data: data, > cache: false, > processData: false

[web2py] Re: Get files from string

2019-02-26 Thread Leonel Câmara
How are you making the ajax call? Do you have processData: false and contentType: false in your options? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) ---