6 messages in com.mysql.lists.win32RE: uploading file via ASP gui, then ...
FromSent OnAttachments
Phil Jones13 Mar 2005 21:15 
Armando13 Mar 2005 22:08 
J.R. Bullington14 Mar 2005 05:26 
Armando14 Mar 2005 18:36 
Phil Jones14 Mar 2005 21:59 
Erich Dollansky15 Mar 2005 00:32 
Subject:RE: uploading file via ASP gui, then saving in a folder on the server
From:J.R. Bullington (bull@innovatim.com)
Date:03/14/2005 05:26:23 AM
List:com.mysql.lists.win32

Phil, Here's the "free" version. Go to ASPUpload.com. Its trial version is free, but
you can learn the way to upload files/file names into the database or a specific directory.
You can also get the *free* tool from aspSmart.com, aspSmartUpload.

Both tools I have used with phenomenal success. However, if you want the code to
upload graphics into the database/specific directory, I have lots of code that you can use, or I
can write it for you.

The ASP Bible, which you can get at any bookstore, shows you how to do this in
detail and it is worth the $60. You can also go to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vbscripttoc.asp
for more info.

As a side note, I use MySQL to store images and PDF files IN the database. Works
really well for me when creating/using functions for my sites. Don't knock it unless you've tried
it. There are lots of reasons to store images/PDFs/Word/etc docs into the database, you just have to
have the right reasons.

HTH, J.R.

-----Original Message----- From: Armando [mailto:diji@shaw.ca] Sent: Monday, March 14, 2005 1:09 AM To: win@lists.mysql.com Subject: Re: uploading file via ASP gui, then saving in a folder on the server

I'm assuming you don't want to store the file in the database itself, which not
many people recommend if you want to keep your database running more efficiently. Which
means yhat your question isn't really mysql related, however:

I'm surprised you don't have a book that covers file uploading, and mind you it
has been some time since I did any vbscript (all PHP now) but what you should need to use is the scripting.filesystemobject object. Just google it and I'm sure you'll find plenty of resources. Also check out
freevbcode.com as I'm sure there are some examples there. A few things to note though:

1) The code should be running as a user with write priviliges to the server's
file system (ie: the SYSTEM user) and not the user trying to upload. The obvious reason is security;
You don't want web anonymous users to have write access to your server's file system.

2) If people are going to be uploading large graphics or files and they perhaps
are on slow connections, remember that scripts will timeout after a set period. I believe
it's 90 seconds (at least that's what it is on IIS 5 on Win2K server if I recall correctly...) I
believe you can change the script timeout period with vbscript at the page level, though I never had a
need to do it myself, or you can change it at the server level in the website properties
through the IIS console.

3) Get a better ASP book :)

Cheers.

Phil Jones wrote:

Not a one of my ASP books covers this. The one example I've seen in message forums is designed to save files in a database. Here's the problem:

Hosting server O/S: Windows Server 2003 Objective: have an asp page that allows the user to upload a graphic file. The file will be saved in a folder on the hosting server.

Anyone know have a working example, or know where I can obtain a working example?

Thanks! -Phil