Closed johan12 closed 11 years ago
I saw this fix:
- <form id="myAwesomeDropzone" class="dropzone">
+ <form action="upload.php" id="myAwesomeDropzone" class="dropzone">
but it didn't work, the problem is that you have to get back to dialog.php, so I came up with the following fix:
- include 'config.php';
- include('utils.php');
+ if(isset($_POST['submit'])){
+ include('upload.php');
+ }
+ else{
+ include 'config.php';
+ include('utils.php');
+ }
...............
- <form action="upload.php" id="myAwesomeDropzone" class="dropzone">
- <input type="hidden" name="path" value="<?php echo $cur_path?>"/>
- <input type="hidden" name="path_thumb" value="<?php echo "thumbs/".$subdir?>"/>
- <div class="fallback">
- <input name="file" type="file" multiple />
- </div>
- </form>
+ <form action="dialog.php" method="post" enctype="multipart/form-data" id="myAwesomeDropzone" class="dropzone">
+ <input type="hidden" name="path" value="<?php echo $cur_path?>"/>
+ <input type="hidden" name="path_thumb" value="<?php echo "thumbs/".$subdir?>"/>
+ <div class="fallback">
+ <input name="file" type="file" />
+ <input type="submit" name="submit" value="plaats" />
+ </div>
+ </form>
I don't know whether this is the best solution, but it worked for me.
thank you this afternoon i try and change this
On some browsers the dropzone isn't supported. Therefore dropzone has a fallback, so you can upload with a browse button. The problem is that there is no submit button, so you can't upload the file.
Any solutions?