Important alert: (current site time 7/15/2013 11:54:41 PM EDT)
 

winzip icon

Upload Files Without COM

Email
Submitted on: 1/13/2001 4:56:05 PM
By: Lewis E. Moten III  
Level: Intermediate
User Rating: By 13 Users
Compatibility: ASP (Active Server Pages)
Views: 76367
author picture
(About the author)
 
     Allows you to upload multiple files and fields without purchasing or registering COM objects. Great for shared hosts that frown upon 3rd Party com objects or charge an arm and a leg for them. This version uses Classes rather then the dictionary object that I have seem most other people use. Dictionary Objects seem to be flakey with more problems. I have added examples of how to upload a file to a database and the file system. A file is also included that retreives the file from the database.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 102 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
1/14/2001 3:29:30 PMRR_Pilot

do these files actually get uploaded if they do where does it save to? or does it just get info?
(If this comment was disrespectful, please report it.)

 
1/20/2001 3:35:13 AMelaroy

I got a nice table but how do I get it to save the uploaded file data as a file on the server?
(If this comment was disrespectful, please report it.)

 
1/23/2001 2:09:13 PMLewis Moten

Ok, I've added some extra files that show you how to save your files to a database and the file system. A sample database is included so this should work rite out of the box.
(If this comment was disrespectful, please report it.)

 
1/31/2001 5:30:29 PMJoel Wyrick

Great code. This worked right out of the box and it was just what I was looking for!
(If this comment was disrespectful, please report it.)

 
2/6/2001 2:20:59 PMStephen

Very Good code, Great for automating my site so that my boss can even update it now, thanks.
(If this comment was disrespectful, please report it.)

 
2/19/2001 11:44:00 AMTommy

Hi !!
I having problems getting the File system upload to work When i push the upload button i get a page can`t be displad message !

What is the problem
(If this comment was disrespectful, please report it.)

 
2/19/2001 11:42:34 PMLewis Moten

Page can't be displayed? Hmm.. Without more details, my guess would be that an error had occured within the code. As to the reason, my best guess is that the Internet User account does not have access to write files to the directory that you are uploading files to. Find the directory in your file system and view its properties. Click on the security tab. Click on the button [Add...]. Search for a user beginning with
(If this comment was disrespectful, please report it.)

 
2/19/2001 11:44:24 PMLewis Moten

beginning with "IUSER_" and Click [add] so they appear in the list of users who have permission to access the directory below. Click [OK]. Make sure that they have "Write" permissions. You may also want to allow them "Modify" permissions as well. I hope this helps.
(If this comment was disrespectful, please report it.)

 
2/27/2001 9:21:33 AMSoffipropp

Looks good. I have one problem though, I can´t open the database, why??
(If this comment was disrespectful, please report it.)

 
3/21/2001 4:38:07 PMwesley

is there a readme file on how to set it up?
1)I simply have IIS 4, is that enough?
2)I tried it but it returns an error
: 'Fields(...).AppendChunk'
(If this comment was disrespectful, please report it.)

 
3/21/2001 4:40:15 PMwesley

1)is there a readme file to setup?
2)what other server requirement is there?? 3rd party programs? I simply have IIS 4
3)I tried upload to a database but I got this error
: 'Fields(...).AppendChunk'
thanks
(If this comment was disrespectful, please report it.)

 
4/2/2001 1:23:38 PMMike

Although this code works wonderfully, the problem we're encountering (with our COM solution, and this code) is that we can't seem to open a file on a remote machine from IIS. FSO fails, our COM attempts have failed, etc. Uploading the file to the web server works fine. Uploading it to a share on the SQL server fails. Outside of IIS, the file can copy over fine... it is definately limited to IIS (we've even had our
(If this comment was disrespectful, please report it.)

 
4/2/2001 1:24:33 PMMike Knowles

(we've even had our "outside-of-IIS" copy app impersonate the IIS Anonymous account to check to see if it was a permissions issue - even though the share is world writable)

Any thoughts? Have you tested this code against uploading to a remote machine?

(nice code, otherwise!)
(If this comment was disrespectful, please report it.)

 
4/23/2001 4:34:48 AMlost_soul

i can't upload jpg files.
BTW:
can anyone upload files larger than 150++kb????
i'm having error with this.
anyone can solve this error?
is there a script time out???/

thanks..........
(If this comment was disrespectful, please report it.)

 
5/2/2001 11:37:12 AMBill Kehn

I keep getting this error with the file system upload. All permissions are good. BTW database upload works great.
(If this comment was disrespectful, please report it.)

 
5/2/2001 11:39:00 AMBill Kehn

I'm not sure if I included the error in my last post but here it is.

Error Type:
Microsoft VBScript compilation (0x800A0411)
Name redefined
/ToFileSystem.asp, line 11, column 4
Dim sPath
---^

Thanks

(If this comment was disrespectful, please report it.)

 
5/11/2001 6:07:14 PMBrian Conner

I need a script that will allow me to upload files up to 5 Mb. Is this possible with this script or am I going to get timeouts?
(If this comment was disrespectful, please report it.)

 
5/23/2001 10:37:24 AMJF

I get this error when I click on the UPLOAD button:

***********
Microsoft VBScript compilation error '800a0400'

Expected statement

/Office/bulletinboard/upload2/clsUpload.asp, line 11

End Class
^
*********

What did I miss?
(If this comment was disrespectful, please report it.)

 
6/4/2001 4:38:41 AMJose Andres

I am trying to find an Upload solution than not uses the 100% of CPU of the server when uploads a big file. How can I solve this problem? I have passed the last Service Packs, and I think that my IIS is well configured.
Thanks.
(If this comment was disrespectful, please report it.)

 
6/8/2001 3:33:20 AMNicholas Hurt

Great Code! But how would I ensure that the files uploaded can only be of the .gif or .jpg type? Is there some parameter line I can use? Thanks
(If this comment was disrespectful, please report it.)

 
6/8/2001 9:57:49 AMLewis Moten

ack! soo many people responding. I'll try to answer your questions, but I may be a little slow. To tell if the file is a JPG or GIF - look at the ContentType. I believe they are image/jpg and image/gif. Also, Netscap content types might be a little different then Internet Explorers, so you'll have to check them out and determine wich one is witch. You can also look at the last 3 characters of the file name. (Obviously they are "GIF" and "JPG"). If you really want to get advanced, You can do a search on the binary data. the first three letters of the GIF's should be GIF - remember to search via. binary (ASCII)
(If this comment was disrespectful, please report it.)

 
6/8/2001 9:59:46 AMLewis Moten

Upload without using CPU 100%? You might want to look into professional components for that one. If you are working on a very large solution, you may want to consider building your own that will work with COM+ so that another machine will handle the parsing of the binary data. Other then that - I'm at a loss for a solution to the problem without further investigation.
(If this comment was disrespectful, please report it.)

 
6/8/2001 10:01:21 AMLewis Moten

Answer to "JF"'s problem - Expected statement. Something tells me that you opened an "If" statment and didn't close it somewhere ... before you included my class in your web page. Just look through your code and make sure the syntax is correct.
(If this comment was disrespectful, please report it.)

 
6/8/2001 10:04:00 AMLewis Moten

Brian Conner: In order to allow large uploads, you need to setup the Server.ScriptTimeout to allow more time before the page dies. This is measured in seconds - and I believe it is setup to 2 minutes (120 seconds). Just set it up to Server.ScriptTimeout = Minutes * 60
(If this comment was disrespectful, please report it.)

 
6/8/2001 10:05:54 AMLewis Moten

Bill Kenn: I accidentally declared the variable twice. Just take out line 11. I'll have to look at the code tonight to see if I fixed this problem before.
(If this comment was disrespectful, please report it.)

 
6/8/2001 10:09:53 AMLewis Moten

Mike Knowles: What i'm gathering is that you have a mapped network drive that you wish to save a file to. If this is the case, then the problem is this - The remote computer is not comprimizing the web servers local Internet User account. One idea i would try is adding the internet user to the remote server (Remember, this account name has the machine name within its username). If that doesn't work, I would then check to see if your COM object that you were trying supports impersinating NT User accounts. If so, the solution is easy. Just make it pretend it is a user on the remote machine. Hopefully that helps solve the problem.
(If this comment was disrespectful, please report it.)

 
6/8/2001 10:13:27 AMLewis Moten

wesley: there are not read me files other then the feed back you see here and my email address. I am uncertain as to the problem with the .AppendChunk. One idea may be that your file is just too large and may need to be broken appart for multiple Append Chunks. Another is that perhaps your version of ADO doesn't support this method. I havn't tested this on other platforms besides Win2K with ADO 2.6. The way I build most of my code here is to support the idea that you don't have to install anything more then the basic web server setup in order to use my code.
(If this comment was disrespectful, please report it.)

 
6/19/2001 11:36:25 AMSeamus McConville

The code works well. If I am uploading a large file is it possible to display a progess bar to give the user a rough indication of how long it would take. Or maybe you could suggest a site where I could find this?

Thanks.
(If this comment was disrespectful, please report it.)

 
7/3/2001 11:07:05 AMBrent

Nice script! Can't upload anything above 150K though, even though I've set Server.ScriptTimeout to about 10 minutes. Noticed someone else above was having the same problem. 150K seems about the limit for me to. Anybody have any ideas?
(If this comment was disrespectful, please report it.)

 
7/3/2001 11:11:08 AMlewis@moten.com

Yes, I'm having the same problems myself. I don't know why though. I'll have to dig into the code when I get some free time.
(If this comment was disrespectful, please report it.)

 
7/19/2001 2:35:28 PMJenz

Hello!

HAD the same problem as stated above,
but I increased the ScriptTimeout to 3600, after that it worked fine.

The ScriptTimeOut is set in seconds.

Running on NT 4.0/IIS 4.0 SP 5
(If this comment was disrespectful, please report it.)

 
7/19/2001 2:41:51 PMJenz

Did I mention that I uploaded a picture that was 5'576'202 bytes?
(If this comment was disrespectful, please report it.)

 
8/3/2001 11:52:43 AMSteve

Great script. I have a really novice question. I need to increase the ScriptTimeout so that I can upload larger files, but don't know where to find that setting. Can someone let me know where to find it. Thanks!
(If this comment was disrespectful, please report it.)

 
8/8/2001 11:43:34 AMcgarnir

is it possible to insert a session variable in to the Server.MapPath string
i want to insert a subdirectory at runtime.
i know that the category directory exist so i can include this, but what about a subdirectory we only know from a session variable?


' Save the file to the file system
Set fso = CreateObject(
(If this comment was disrespectful, please report it.)

 
8/8/2001 11:45:12 AMcontiniu

Set fso = CreateObject("Scripting.FileSystemObject")'
strPath= Server.MapPath(".\category\") & "\"
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
FSO.OpenTextFile(strPath & sFileName, nForWriting, True).Write sNewData
Set FSO = Nothing

(If this comment was disrespectful, please report it.)

 
8/28/2001 2:08:06 AMThe great sam

Works well on my personal servers, but not on my shared one. Any ideas?
(If this comment was disrespectful, please report it.)

 
10/23/2001 8:21:28 PMchrisoleary@att.net

Hi, I was trying to run the upload app and got the following error:

Server object error 'ASP 0177 :
800a0046'
Server.CreateObject Failed
/UploadWSC/ToFileSystem.asp, line 37
The operation completed successfully.

What am I missing? Thanks, Chris.
(If this comment was disrespectful, please report it.)

 
11/12/2001 8:41:26 AMDazza

Hi, I was trying to run the upload app
and got the following error:

Server
object error 'ASP 0177 :
800a0046'

Server.CreateObject Failed

/UploadWSC/ToFileSystem.asp, line 37

The operation completed
successfully.

Any ideas ?
(If this comment was disrespectful, please report it.)

 
11/13/2001 5:17:07 PMShane Poppleton

I am getting the same problem as JF,
Expected statement

/upload/clsUpload.asp, line 11

End Class
^

You mentioned about not having an if statement closed, i have tested you script on Win2000, and it worked out of the box, but the server hosting our site is NT4, and i get the same problem, Does older versions of IIS, not support
(If this comment was disrespectful, please report it.)

 
11/13/2001 5:18:44 PMShane Poppleton

"class", sorry message got chopped.
(If this comment was disrespectful, please report it.)

 
11/27/2001 10:02:05 AMAhilan

Simply Super. This what i was asking my friends for a long time. My Heart Full of thanks for your Solution. I faced security problem with Filewriting but i selected DataBase system. No Problem.
(If this comment was disrespectful, please report it.)

 
1/23/2002 1:02:55 PMPeter

Trying to add form fields, example, text and checkboxes, how do I call the value on todatabase.asp?

Thank you, great code, worked out of the box!
(If this comment was disrespectful, please report it.)

 
1/23/2002 1:03:20 PMPeter

Trying to add form fields, example, text and checkboxes, how do I call the value on todatabase.asp?
(If this comment was disrespectful, please report it.)

 
2/23/2002 4:38:09 PMJose Rodriguez

As I can show the image kept in mdb within a pagina htm? It does not show the image to me. Response.BinaryWrite does not show the image,
interprets it like flat text

(If this comment was disrespectful, please report it.)

 
3/3/2002 9:00:36 PMMatt Pfingsten

Alright, forgive me if I sound like a newbie, but I can't seem to find Server.ScriptTimeout in ToFileSystem.asp, ToDatabase.asp, or clsUpload.asp.
I too would also like to know how to add form fields to the database along with the file.
(If this comment was disrespectful, please report it.)

 
3/4/2002 1:08:54 PMMatt Pfingsten

well I figured out the server.timeout thing.
But still, how do you add the contents of HTML form elements to the database?
(If this comment was disrespectful, please report it.)

 
3/22/2002 1:31:54 AMCarsten Hering

Hi,

I'm having the same problem as Shane Poppleton (compilation error in clsUpload.asp) when runnig the script on the webserver. Did someone find a reason or solution to this?
(If this comment was disrespectful, please report it.)

 
3/22/2002 2:09:52 AMCarsten Hering

Hi again,

I figured it out:
It is because of the Version of VBScript.
On IIS 4 it's 3.0 and on IIS 5(W2K) it's 5.0 and the Class Object is only supported in 5.0.
Here you can find a refernce to all VBScript Versions and the awaylable Features:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/h tml/vtoriversioninformation.asp

(If this comment was disrespectful, please report it.)

 
3/27/2002 1:39:45 PMLewis Moten

NEW VERSION OF CODE NOW AVAILABLE

http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=7361&lngWId=4
ENJOY

############################

(If this comment was disrespectful, please report it.)

 
4/29/2002 8:55:13 PMDexter Zafra

Can anybody here help me with this problem?Am I pointing it to the right path? Pls help..Thnx for this nice piece og code..

Microsoft VBScript compilation (0x800A0411)
Name redefined
/dexter/upload/ToFileSystem.asp, line 11, column 4
Dim sPath

(If this comment was disrespectful, please report it.)

 
6/4/2002 4:38:40 AMAlessandro

the browser gives me this error:


Microsoft VBScript compilation error '800a03ea'

Syntax error

/app/clsUpload.asp, line 2

Class clsUpload



the thing I don't understand is that the code works perfectly in I create in IIS a virtual directory.
It gives that error if I run in in a
(If this comment was disrespectful, please report it.)

 
6/4/2002 8:59:18 AMLewis Moten

Alessandro. It sounds like you dont have the latest vbScript installed. I believe you need at least version 5.0. goto

http://www.microsoft.com/scripting/

also, there is a new version of this
script on PSC.

http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=7361&lngWId=4

(If this comment was disrespectful, please report it.)

 
6/12/2002 4:21:46 AMJens Jakobsen

What's this?
Microsoft VBScript compilation error '800a0400'

Expected statement

/salg/upload/clsUpload.asp, line 11

End Class
^

I've spent some time with it and I am getting grey hairs... I have configured the folders where the database is AND the folder where it says "Uploads" - but every time I try to upload I get the before mentioned error msg :((((
(If this comment was disrespectful, please report it.)

 
6/12/2002 4:24:48 AMJens Jakobsen

Eh - when I said "configured" I meant that the anonymous internet account has been given write access.

Is it because I have an old IIS 4.0 (and IE4.0) server that hasn't been touched (more or less) since it was installed?
(If this comment was disrespectful, please report it.)

 
6/12/2002 11:07:59 AMLewis Moten

It appears that the code does not have a closing END IF statment somewhere. There is now a version 2 for this code.
(If this comment was disrespectful, please report it.)

 
6/19/2002 8:11:37 AMNeha

Hi
I was using this script successfully. But after I formatted my machine and reinstalled Windows 2000 and IIS, the script doesn't work. It simply hangs without giving any error message.
Please help
Regards
(If this comment was disrespectful, please report it.)

 
6/19/2002 8:13:01 AMNeha

I have been successfully using this script. But after formatting my PC and reinstalling Windows 2000 and IIS, the script doesn't work. It simply hangs without giving any error message. Please help
Thanks
(If this comment was disrespectful, please report it.)

 
6/19/2002 8:38:32 AMLewis Moten

Make sure that all service packs are installed and that you have the latest version of vbScript. There is also a version 2 of this script now.
(If this comment was disrespectful, please report it.)

 
6/23/2002 9:37:41 AMNeha

Thanks a lot for your reply.
All the packs are properly installed and I have IE5 on Win2k.
I even installed your newer script, but the problem still persists.

Could it be because of the File System on the machine.
On one server where the script is working the File SYstem is NTFS while the one on which it doesn;t work has FAT32.
(If this comment was disrespectful, please report it.)

 
7/26/2002 11:00:10 PMDavid Russell

I have installed the code and I am able to upload to the database. I am using it to upload images--is it possible to view more than one image at a time on a web page?

Thanks
David
(If this comment was disrespectful, please report it.)

 
9/23/2002 11:43:34 AM

I get this error, any ideas? I am trying to include the code on a page with other form fields.

Request object error 'ASP 0206 : 80004005'

Cannot call BinaryRead

/support/evalcenter/clsUpload.asp, line 142

Cannot call BinaryRead after using Request.Form collection.

(If this comment was disrespectful, please report it.)

 
9/23/2002 12:55:04 PMLewis Moten

You can not use the Request.Form collection on the same page that you use Request.BinaryRead. Once you do one, you can not do the other. Just use the upload object instead of the request object to acquire the form fields that were passed.
(If this comment was disrespectful, please report it.)

 
10/13/2002 12:51:33 AM

The script works perfectly when installed and used as written. However, I want to have it match the 'FileName' in the database instead of the 'FileID', as the end of the query. I changed your part ...WHERE FileID =
(If this comment was disrespectful, please report it.)

 
10/30/2002 10:21:01 AM

I can upload to the database fine but when I try to upload to a folder, the browser just runs and times out. the file size is only 2.8k. Any suggestions?
(If this comment was disrespectful, please report it.)

 
11/7/2002 4:11:01 AM

I wonder where in the code must (in which row)I do the change (It must be in the ToDatabase.asp page)for having it working in the database that I created (the name of the database is "criteria"). And where must I change
the name Uploads redireccion the uploads data to the proper cathalog.
Thank you in advance and It is a great job you did.
daniel

(If this comment was disrespectful, please report it.)

 
12/17/2002 12:21:14 AM

Hi,
The code is perfectly alright. I was able to upload the files of small size of upto 30 to 40 KB but Unable to upload the file of size 2.5MB. What to do? I need to upload large data. Any settings in the code or any solution will be greatly appreciated. Please help me in uploading large files. Thanks in advance.
(If this comment was disrespectful, please report it.)

 
1/8/2003 9:41:58 AM

This code worked great, but I have already implemented this portion of my upload and it is working fine. What I am looking for now is a way to upload more than 1 file at a time w/out using the five seperate times as attachments. My client would like to be able to select all files in the browser window at one time. I don't know if I will need to use an ocx for this and if I do, I am not real certain how to write an ocx. Can you help me with this.
(If this comment was disrespectful, please report it.)

 
1/8/2003 10:55:22 AMLewis Moten

No. Browsers do not support multiple file uploads within the same input element under a form. It looks like you will need to use an activex control. SoftwareArtisians may provide such an option. Search for SAFileUp - I think they even registered the domain SAFileUp.com.
(If this comment was disrespectful, please report it.)

 
1/16/2003 10:23:05 AM

any way of adding another field to the form, so that user can choose target folder for the file?thank you very much indeed
(If this comment was disrespectful, please report it.)

 
1/16/2003 10:34:33 AM

referring to the last comment, this is the error I got

Error de Microsoft VBScript en tiempo de ejecución (0x800A01B6)
The object does not accept this property or method
/manolo-sdk/ToFileSystem.asp, line 14

and this is my line 14
strPath = objUpload("carpeta") & "\" & strFileName

(If this comment was disrespectful, please report it.)

 
3/21/2003 5:55:33 AM

Error line 178 --- I found where it comes from but don't know what to do with it:

If I write the file to any harddrive or any folder NOT wwwroot or below it works fine. but inside wwwroot or below it does not work.

but as i want users to upload images that can be veiwed it needs to be in wwwroot, is that correct ? i turned on "read/write" in IIS for the folder (and for whole wwwroot too) but it did not help. any ideas ?
thx michael
(If this comment was disrespectful, please report it.)

 
3/21/2003 6:29:53 AM

Error line 178: SOLUTION (win2k server)
Ok, pretty simple: you have to change the rights not inside the IIS but in the normal file system.
Simply add the "Anonymous Logon" user and give him write rights.

Question:
is that dangeours, does it create security holes ? If so: how to avoid this / any other solution ?
(If this comment was disrespectful, please report it.)

 
4/2/2003 3:46:29 PM

Nice code, works well. What is the ideal size. I noticed that files above 100 K are really slow to upload. Is there a fee for a faster code, we would be ready to pay the extra charge. pse answer b.donnay@mindnew.com
(If this comment was disrespectful, please report it.)

 
4/2/2003 3:48:04 PM

ASP upload: very neat code, but we have performance problems: above 100 K it is very slow. We would be ready to pay for a performance improvement. Thanks for an answer.
(If this comment was disrespectful, please report it.)

 
4/17/2003 1:40:40 PM

I have a problem when i try to upload more than one image file. The error is "InValid Procedure Call in MidB".
What should be done? PLease advice.

(If this comment was disrespectful, please report it.)

 
4/17/2003 2:42:10 PM

hai,
its a nice code.
but i have problem when i try to upload more than one image file. what should be done? please explain.
the error is

Microsoft VBScript runtime error '800a0005'

Invalid procedure call or argument: 'MidB'

/prWatch/admin/clsUpload.asp, line 148

Thanx in advance.
please respond immediately.


(If this comment was disrespectful, please report it.)

 
5/27/2003 9:25:02 AMArianRajiv

i am just going to try it

arianraj@hotmail.com
(If this comment was disrespectful, please report it.)

 
5/27/2003 9:31:11 AMArianRajiv

hi dear
i am just to try the code
expect to upload upto 1MB with this

bye
Rajiv
(If this comment was disrespectful, please report it.)

 
6/27/2003 3:48:48 PM

I keep getting
(If this comment was disrespectful, please report it.)

 
6/27/2003 3:49:40 PM

I keep getting "Invalid procedure call or argument: 'MidB'" error. Please help!
(If this comment was disrespectful, please report it.)

 
7/17/2003 8:53:46 AM

Currently when using the FileUpload Class the default files that can be selected from the "File Types" drop down list are:

All Files (*.*)
Pictures (*.gif,*.jpg)
HTML (*.htm,*.html)

I want to change this to

Adobe (*.pdf) only.

Is this possible?
(If this comment was disrespectful, please report it.)

 
7/17/2003 5:53:10 PM

how can I fix this code so that it can upload more than 100K?
(If this comment was disrespectful, please report it.)

 
8/21/2003 4:19:50 AM

WOW !!!
Great
Thanks Lewis Moten
(If this comment was disrespectful, please report it.)

 
11/20/2003 4:53:50 PM

How to use upload object in place of request object to get values of additional form fields?
(If this comment was disrespectful, please report it.)

 
1/28/2004 2:40:02 AM

I tried your code on my own website and it worked fine, but when I move the code to a different hosting company it gives me an error. The error it gives is
(If this comment was disrespectful, please report it.)

 
1/28/2004 2:42:32 AM

I tried your code on my website and it works great but when I move the same pages to a different hosting company they don't work. It gives me "Permission denied". Can you tell me why that is and how do I fix it? Thank you for your time.
(If this comment was disrespectful, please report it.)

 
2/26/2004 1:29:19 AM

Upload file without COM is helpful 4 me. But,.. please let me be able to resize uploaded image size. I want to have thumbnail version of pic uploaded by my user. Thanks 4 ur answer
(If this comment was disrespectful, please report it.)

 
2/26/2004 1:33:57 AM

Upload without COM is very helpful for me, but..., please allow me to resize the image size. I want to have a thumbnail version of pics uploaded by my users. Can I? Thanks 4 ur answer!!
(If this comment was disrespectful, please report it.)

 
2/26/2004 3:02:33 AM

Hii
The file uploading works well..,
But I've a problem with upload progress.
The progress show 0 bytes out of 0 bytes total durig progress. After completed or stoped in the middle, it show the right info.
Note that my SESSION is ENABLED!!
Could you explain what's the problem? And please come out with the solution. Thanks anyway!!
(If this comment was disrespectful, please report it.)

 
3/2/2004 5:32:33 AM

Hi this code (database version) works fine with IIS on my laptop ). When I upload the database and code to my host everything seems to work okay but the files don't apear in the database.

Any ideas

Cheers

Jeremy

jwie@yahoo.com
(If this comment was disrespectful, please report it.)

 
3/4/2004 12:50:30 AM

Brilliant!!! Iv I had seen this a while back - it would of been 5 from me!
(If this comment was disrespectful, please report it.)

 
2/8/2005 3:41:03 AM

IS THERE ANY WAY TO MAKE THE IMAGE ATTACHMENT OPTIONAL?

AT THE MOMENT I GET 08022005 kljh8787ygh.BIN
(If this comment was disrespectful, please report it.)

 
7/28/2005 10:27:35 AMGuitarGeorge

Not sure if it's been mentioned but the error I found in the clsUpload.asp page is the sFile was Dimensioned twice

********Delete one of the "Dim sPath" lines and it works fine.**********

I have made this error many times myself.
Great Code, Thanks!
(If this comment was disrespectful, please report it.)

 
7/28/2005 10:28:03 AMGuitarGeorge

Not sure if it's been mentioned but the error I found in the clsUpload page is the sFile was Dimensioned twice

********Delete one of the "Dim sPath" lines and it works fine.**********

I have made this error many times myself.
Great Code, Thanks!
(If this comment was disrespectful, please report it.)

 
7/28/2005 10:28:58 AMGuitarGeorge

Not sure if it's been mentioned but the error I found in the clsUpload page is the sFile was Dimensioned twice

** Delete one of the - Dim sPath - lines and it works fine.**

I have made this error many times myself.
Great Code, Thanks!
(If this comment was disrespectful, please report it.)

 
7/28/2005 10:29:49 AMGuitarGeorge

Not sure if it's been mentioned but the error I found in the clsUpload page is the sFile was Dimensioned twice
** Delete one of the - Dim sPath -lines and it works fine.**
I have made this oversight many times myself.
Great Code, Thanks!
(If this comment was disrespectful, please report it.)

 
6/7/2006 1:53:18 PMYamino kamen

Hi
First I would like to thank you! ^_^
The code is grate it helped me a lot,
But¡K ƒ¼
It works on my laptop perfectly fine but not on my web sit
The error I get is this:
(There is a problem with the page you are trying to reach and it cannot be displayed)
Any suggestion

(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.