Link to home
Start Free TrialLog in
Avatar of Aleks
AleksFlag for United States of America

asked on

Drop Zone upload (rename) with ASP Classic

I am using ASP/Classic and looking forward to replacing my current upload with DropZone  (http://www.dropzonejs.com/)
DropZone allows uploading multiple files at once instead of one at the time.

I was able to setup the dropzone on my page but I have no clue what to do from that point forward, to actually make it upload those files into a folder of my choosing (I have the path in a session variable), but also rename the files.  Then I will insert the renamed file into my DB.

So I need some guidance to do this.
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

With any upload solution there are two components.

The script / html on the client side that "collects" what files must be uploaded
The receiving script on the server that accepts the files being uploaded and processes them.

However, ASP classic does not make it easy to process files - so you probably want to look at a 3rd party library / class that does the work for you.

If you google ASP file upload you should find a few - here is a link that discusses the process which may be of assistance
http://www.codeguru.com/csharp/.net/net_asp/article.php/c19297/Pure-ASP-File-Upload.htm



From the above you
Avatar of Aleks

ASKER

I understand. Dropzone is the side that collects the files. I got that covered.
I do need help implementing the rest. I usually take an example and adapt it but in this case drop zone doesn't have one.
I am open to use ANY asp uploaded component that can work with dropzone. Buy it if needed. The easier the implementation the better.
Where would I start ?
Did you have a look at the article I posted - I would start there.
I just created this html file
<!doctype html>
<html>
<body>
<form action="http://myserver/aspupload/uploadexmple.asp" class="dropzone"></form>

<script src="https://rawgit.com/enyo/dropzone/master/dist/dropzone.js"></script>
<link rel="stylesheet" href="https://rawgit.com/enyo/dropzone/master/dist/dropzone.css">	  
</body>
</html>

Open in new window

And pointed it to uploadexample.asp page that is in the file download in the article I posted.
Worked pretty much out of the box - all I had to do was change the path in the asp file where I wanted the files saved.
Avatar of Aleks

ASKER

I'll be able to test it in about an hr if it works I'll just need help renaming the tiles and then somehow saving the names in the database. Not sure how I'll do that.  I guess run a sp after each file uploads ?
That all gets done in the uploadexmple.asp that comes with the demo - you can see there where the save is done and simply implement your rename code as desired. The script as it stands uses the same name as the file uploaded.
Avatar of Aleks

ASKER

Ok .. I am going to try the code you sent first.
Avatar of Aleks

ASKER

I was looking at other solutions, seems ASPUpload may be more robust. Is there a chance we can go with that and test ?  their drop zone interface is not as nice so I want to replace it with DropZonejs if possible.
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Martin G
Martin G

Thanks a miliion for this. After hours of trying to figure out a similar issue with fineuploader this was the problem.