Download AJAX + Coldfusion

I use the following jQuery plug-in to load ideas:

http://valums.com/ajax-upload/

For some reason, I get the following error:

The cffile action="upload" requires forms to use enctype="multipart/form-data".

Despite the fact that the plugin code has it:

var form = qq.toElement('<form method="post" enctype="multipart/form-data"></form>');

What ideas might come up?

+3
source share
2 answers

This is because Safari4 and Chrome5 do not allow xhr request formatting in the same way as regular form-based loading.

You will need to get the source data and write it to a file when the normal path to get the file is unavailable.

and return {"success": true}

or in case of error {"error": "error message to display"}

Coldfusion GetHttpRequestData, , , Coldfusion.

http://www.adobe.com/livedocs/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000482.htm


, , Safari5, Chrome6 FF, , IE.

http://github.com/valums/ajax-upload

+5

? , CFM .

0

Source: https://habr.com/ru/post/1756379/


All Articles