I tried following the example: http://www.plupload.com/example_custom.php
But in the request, the file is not sent to the controller method, but only the name.
Maybe I need to set up a plupload configuration, something like "multipart = true"
Any idea?
The question was a long time ago. But they will answer for other people who are looking for a solution.
The solution for this is to add "multipart: true" to your pluploadQueue ({}) function. This will send the file as multipart. For several files, it will send / POST request several times. Then you can handle it on your controller.
Hope this helps.
Jas
I have no experience with Plupload. I do not think that you will need to explicitly deal with multi-page downloads in the plugin configuration. (This is still a file loader library.) Don't get me wrong, but do you have a multipart attribute equal to true in the html markup?
W3C claims it to download a file ...
<FORM action="http://server.com/cgi/handle" enctype="multipart/form-data" method="post"> <P> What is your name? <INPUT type="text" name="submit-name"><BR> What files are you sending? <INPUT type="file" name="files"><BR> <INPUT type="submit" value="Send"> <INPUT type="reset"> </FORM>
Can I see some more code. There are many things that could go wrong.
Also, can you use the debugger after submitting the form and submit params output here?
J
Ps By the way, I tried to make it a comment, but did not go ...
A few "any" ideas ...: -p
Is it likely that the file you are trying to download is filtered using some security feature in Rails, the rails proxy (apache?), Or even some client-side software?
Have you tried different browsers to make sure this is not a customer problem? (sniffing your network connection may be another way to check if the file is really being sent to the server)
If you are using a rack, then there is some middleware that can take care of downloading files for you. Not what you wanted, but perhaps useful as a temporary workaround, waiting in case you find yourself having to wait for some bug fixes in rails or plupload.
Permissions on the folder where downloaded files should be sent? Or do they first go to memory and write to disk later? Perhaps the plupload library uses temporary files somewhere, and permissions do not work there.
Source: https://habr.com/ru/post/1301254/More articles:"Inactive" way to add javascript to page footer in asp.net - javascriptSaving data using JPA and BeansBinding - javaIs there an AMQP implementation that has a stable C ++ client library - c ++Change mouse icon through javascript - javascriptProblem with a multithreaded server - c ++Using the same MySQL connection on different PHP pages - phpBinary tree to get the minimum element in O (1) - javaAttribute to generate compilation error when calling a method? - c #Non-blocking TextWriterTraceListener? - c #What IDE should be used for C ++ on Windows? - c ++All Articles