T
T
The Dragger2015-04-07 09:23:17
JavaScript
The Dragger, 2015-04-07 09:23:17

What am I doing wrong when I install dropzone programmatically?

<div id="dropZed" class="dropzone"></div>

js скрипт в самом конце файла
<script>
        var dzone = new Dropzone("#dropZed", {
            paramName: "img_url",
            url: "/admin/MyGallery/create",
            method: "files"
        });
        Dropzone.autoDiscover = false;
    </script>

php обработчик
if(isset($_POST['submit'])){
            print_r($_FILES['img_url']);
        }

But I have
Undefined index: img_url; Why did I specify both the method and the parameter in js, the url checked everything correctly.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
F
FanatPHP, 2015-04-07
@FanatPHP

What am I doing wrong

you don’t look through the developer panel which request goes to the server at all

P
Papa, 2015-04-07
Stifflera @PapaStifflera

method: "post"

B
Bohdan Yarema, 2015-04-29
@BobbiZi

Here I have a problem, it doesn’t save files to the server, and I simply can’t figure it out with this plugin, who can help?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question