Closed gbrl closed 7 years ago
Hi @gbrl, just to clarify things a bit: this gem is a simple wrapper around Dropzone JS and its use on a Rails-based application. All this gem does is simplify to work needed to get Dropzone's assets into the Asset Pipeline. It makes no assumptions, no hidden changes to your code, nor it magically detects when you are sending a file with Dropzone (a JS/frontend utility) and gets things working š
Having said that, I recommend you take a look at the generated HTML for the form and see which names those fields are getting. From what I can infer based on the info you provided, your controller expects a upload
parameter which isn't being sent from the client - you may need to check Dropzone's configuration to change the field names used when using the library for sending the files.
I'm closing this issue as this is not related to the gem itself, but feel free to ask any other questions if you should need further help.
Cheers!
Ah OK. Maybe I'll fork and update the README.md when I get it working. Would be useful because all standard rails scaffold forms probably require the same solution. Thanks for the quick response!
That would be awesome! Thanks and good luck with that.
I created a basic scaffold called Upload, installed the gem with JS and CSS etc... added the class "dropzone" to my form, and when I drag and drop files, I get this error:
Does this gem not know how to create the params object properly? I thought it would know to submit the form in its entirety. It seems to be only uploading the one text_field.
Here is the log:
Here is my form:
I read in the docs that the default name for the file_field is "file". Could that be causing the problem? I thought this gem would read the form attributes and figure out what params to send.... Maybe I'm wrong. Please halp! LOL :)
Thanks for your time,
G