Code

Discussion on Drop Uploader - Drag&Drop Javascript File Uploader

Discussion on Drop Uploader - Drag&Drop Javascript File Uploader

Cart 1,007 sales

borisolhor does not currently provide support for this item.

88 comments found.

Hi This script worked fine on older PHP versions. But… using PHP version 8.2.X, stop works. I’m trying use Chunked upload mode (for large files), and their, split correctly file in chunks, but never “merge” their to original file.

this will work on image compression tool?

Hi. What do you mean?

How can i make it so it overwrites an existing file and not change file name?

Hello, what could it be?

I’m sending a 1GB zip via ajax.

console: drop_uploader.js:475 POST .../2.1.2/ajax_upload.php 400 file_upload_ajax @ drop_uploader.js:475 files_added @ drop_uploader.js:302 (anônimo) @ drop_uploader.js:278 dispatch @ jquery-3.2.1.js:5206 elemData.handle @ jquery-3.2.1.js:5014 VM100:1 Uncaught SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON at JSON.parse (<anonymous>) at XMLHttpRequest.<anonymous> (drop_uploader.js:424:41)

Hi. The server returns HTML (probably with some error message) instead of valid JSON. You need to check this message and fix it (I believe that there is some issue with server configuration)

I think there must be some limitation on the server, via Chunked it worked, but it is very slow.

is there any way to rename the files and for it to return the renamed name in the list?

for example,

when we send a file abc.png it renames and adds the _1 like this, abc_1.png, but in the final list both in the ajax and in the normal version it still displays abc.png, so there is a way to rename the file to a unique name and that it returns with the new name?

Hi. You can rename the file after uploading, but these changes will not be visible in the uploader

thanks, I already did that, I even did integration with O s3 and space digital ocean it was great!

Hi there,

How to get different destination folders for 2, 3 or more forms in Ajax?

Example:
Form Ajax 1 -> file_1 -> folder_1
Form Ajax 2 -> file_2 -> folder_2
Form Ajax 3 -> file_3 -> folder_3

Solution based on demo file:

In your index file each form has an <input type=”file” ....>
Add : data-url=”ajax_upload.php” that’s the default file used to define $uploaddir

Duplicate ajax_upload.php file and rename (example) ajax_upload2.php
in this file you can redefine $uploaddir, ex: $uploaddir=upload2
and in your form you change data-url=”ajax_upload2.php”

Need a 3rd destination folder ? Same procedure

AJAX Single File Upload with List Layout
<form method=”POST” action=”upload.php” enctype=”multipart/form-data”>
<input type=”file” name=”file” data-layout=”list” data-method=”ajax” data-url=”ajax_upload.php”>
<input class=”button-primary” type=”submit” value=”Submit”>
</form>

Very usefull if you want to separate images, PDF, excel files etc… in different folders.

Enjoy :)

Hi, is it possible to catch the event of the finished upload of all files?

Hi. I think this is not possible, because the user can add a new file at any time and we don’t know how many files he going to upload

large (65MB) video file produces this error – File not received – but other smaller images/files upload just fine.. can you suggest where to troubleshoot please?

Hi! What uploading method do you use (normal, ajax or chunked)?

Hello! Thank for a great plugin!

Please help me with configuration.

I want use AJAX method with upload file(s) to server only after Submit button click. How can I configure this behaviour?

Hi! You can try to set normal uploading method for uploader, but submit form via AJAX after submit button was clicked.

Chunked uploading does not work on the live preview? Is there an issue with the code for this or is it a limitation of this server? Does the new Edge work with Chunked Uploading?

Hi! Yes, seems like there is something broken. I will fix this and let you know.

Please resend email to my envato account…

Good Morning. Is it possible to add a prefix to the files that are uploaded? Example: Origin: file1.jpg Destination: xx_file1.jpg

Thank you very much.

Hi! Yes. Please open support request on forum https://borisolhor.com/forums/ or just send me PM, and I will explain how to do this.

https://prntscr.com/vq9xzx

as the picture on the link,

I can’t undo / delete the current image file, the deletion goes normally when the PDF file

Hi! It works fine on my site. Can you give me link to your site, I will check

I thought it was right, it turned out that I was wrong, the high resolution of my image was too big, like I said the resolution was w = 100 & h = 1000

thank you, it’s fine

Good Morning. Is it possible to add a prefix to the files that are uploaded? Example: Origin: file1.jpg Destination: xx_file1.jpg

Thank you very much.

Hi! Please write me email. I will explain you, how you can modify script to do this.

Goodnight. As you told me, on the 23rd I wrote the email and I have no response. I urgently need a reply, please.

Thank you.

Reply received. Thank you very much.

Hi, is there a way to preload the attachments in the drag and drop field? That is, once loaded, if the user desists from the process and resumes it hours later, is it possible to show the drag and drop with the files on it?

Hello? I appreciate your support.

Hi! Fixed version already available on CodeCanyon. You can redownload it.

Thank you. Works.

hi, is there a solution to remove the loaded items if the user mistakenly loaded the wrong ones? I found the following, implemented it and it works, but is there anything better now? Thank you.

$(v).after(’<button type=”button” class=”clear-all button red”>Clear All</button>’)

// Then I added a functionality to reset all data. Somewhere in plugin $(document).on(“click”, ”#” + uploader_id + ” ~ .clear-all”, function() { v.value = ’’; $(’#’ + uploader_id + ’ .files li’).delay(400).fadeOut(“slow”); setTimeout(function() { $(’#’ + uploader_id + ’ .files li’).remove(); }, 1000); });

Hi! Do you use AJAX uploading method?

Hello, thanks for answering. I already managed to integrate it into my development. Thank you.

Hi When you use “php” upload (no ajax), don’t appear a trash icon for delete selected file. How I can fix that?

Hi! Delete added files is not available, when you use PHP uploading method.

Is it possible to limit the upload to 15 photos, image only, and the file size up to 1mb?

Hi! Yes. You can get more info in online documentation http://docs.borisolhor.com/drop-uploader/#input

Will this plugin work with FormCraft?

Hi, presales questions: when a file is dragged into the media upload area, if there is a file of the same name in the folder they are uploading to. Will it replace the old file? If so, will the new replacement file have the file ID number as the file it replaced? Thank you, Kimberly

Hi! I will add this feature and let you know.

I just install the files and the uploader will work

Hi! Do you want to install it to WordPress (or other CMS) or just to your hosting?

Hi! Yes, It’s ready to install on server.

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey