I am trying to incorporate Dropzone's upload feature into my Laravel 4 app.
I have include the js/css file in my master layout like so
{{ HTML::style('packages/bootstrap/css/dropzone.css') }}
{{ HTML::script('packages/bootstrap/js/dropzone.js') }}
Then I included the html form where I want the box to appear, in add.blade.php
<form action="/file-upload" class="dropzone" id="my-awesome-dropzone"></form>
But when I navigate to listings/add I cannot see the dropzone. Is there anything else I need to include for it to show up?
确保您没有嵌套表单标签,否则会阻止显示框。
Instantiate the dropzone class on the page.
$("#my-awesome-dropzone").dropzone({ url: "/file-upload" });
This way you could also add in some options that dropzone ships with.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.