thedigicraft / Atom.CMS

Atom.CMS
56 stars 52 forks source link

Part 75 - AJAX File Handling with Dropzone.js #130

Open titabruni opened 9 years ago

titabruni commented 9 years ago

Hi everybody,

I have watched your tutorial in youtube, but it dont fix my issue:

I have a form with several fields, and in my form, i have a div with dropzone. It work fine, but... I can´t upload all datas, included the images.

I prevent the event to upload the image when these are dropped, because I want upload these with the button "send" of the form (with the other fields, too).

How I can do that? Is possible?

Thanks!

creptor commented 9 years ago

It's possible, actually this is the same way it's placed on the videos, but without the javascript part.....

For files you could find an easy solution in this w3schools page, but search for better source if you got time.

REMEMBER: your form must have the enctype="multipart/form-data" to get the file....(I'm not sure why, I didn't search it)

Eckes72 commented 8 years ago

SOLVED !!!

For solving the problem I used: optics_1.0 = on stupid = off

I stored the uploads.php in the wrong folder ...

Hello out there,

like many others before I have to say thank youvery much for this great tutorial ,,, but ,,, ;) with this part I have the issue that I´m not able to upload the files correctly. Actually I am using Win 10 with XAMPP (latest version) at my laptop and as 2. testserver I have a Raspberry Pi 2 (raspbian, apache) and there I have the same problem.

At the admin/users page I´m pulling a picture into the dropzone field, after a few seconds i can see a green checkmark but the files are not in the uploads-folder. I checked the code again and again but I don´t get it ... ?!

is it possible that there is a problem with the uploads-folder ? At the pi I am sure I set the permission to 777 so it should work fine.

Regards Eckes

creptor commented 8 years ago

Sorry for the delay, I forgot about this one :3

The thing is that Apache (which is built inside of many computer-HTML application) does have configuration files, not very visible but it still haves them. To fix most server side thing, that require unusual functioning, you need to have it configured properly.

Also I know that Apache has a upload permission, max-size, and type block for uploading files, you should search for "apache upload" in google, and try to make it around the limits.

If I remember correctly, the name of the configuration is mod_upload.

You should definitely check your code. Most apache servers do have that functionality enabled by default.

NOTE: It's actually very important to use in the form where you want a file to be uploaded, to be method="POST", else the image won't be sent.