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
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
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
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)
---
4 matches
Mail list logo