views:

2497

answers:

8

Hey I was wondering if there were any way to upload images in ASP? I am working on my school's server and I don't really know what is installed and what isn't I Googled a little and came up with "Persits.Upload.1" I tried to instantiate the object with this line:

Set Upload = Server.CreateObject("Persits.Upload.1")

It gave me this error,

Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed

Am I to assume the component is not installed on the server and/or what should I do for uploading images?

Thanks

+2  A: 

File upload is a built in part of html and you can process it in asp without any custom compents. Here is some more information: http://www.4guysfromrolla.com/webtech/LearnMore/Upload.asp

Will Rickards
+1  A: 

This is part of the ASPJpeg library, which needs to be purchased (From Persits.com).

I have used this library to upload multiple items in the past.

To upload a single file you can use the <INPUT type=file name=filename>. This is just HTML though, but should work in all browsers

Xetius
+2  A: 

Sounds like it couldn't load the class, my ASP very rusty though.

That component is a commercial one, so unless someone has paid for it, you probably don't have it installed.

I have used free asp upload http://www.freeaspupload.net/ a few times, although it was a while a go, that might be a reasonably easy option for you.

seanb
A: 

If it's for educational purposes it may be worth droping Persits an email to see if they will give you a free license.

They offer a 30-day free trial on their site.

Good luck

Macka
A: 

Will Rickards' link is good. You will also need permissions for the IUSR to create files in whatever directory you are uploading too.

IIS (6 I think?) comes with a limit of 200K for uploading files. Only the server admin can change it to allow more.

If you can get your schools server to install COM objects, there are a number of free uploading tools that make things very easy.

MrChrister
A: 

I have older classic ASP apps that use the Persits Software AspUpload component. It works great if you need to resize images, get image dimensions, etc., during the upload process. It is a component you need to purchase and it needs to be installed on the Web server in order for it to work. It is not a core part of ASP.

Rich
A: 

Ok, Thanks, the admin of the server at my school is very cautious so I don't think he will install any third party components. I am going to go the route of free for this, so I am going to use http://www.freeaspupload.net/.

Levi
A: 

Don't use components - use free ASP files ... like here:

http://www.point64.com/code/asp/aspuploader/aspuploader.php

asp uploader: a useful script made up of three asp files for website developers and web masters. When installed correctly on your Microsoft IIS web server, the three ASP (Active Server Page) files will allow your users the ability to upload files to the web server. There are no components to install.

asp-uploader.zip contains - 1) uploadform.asp: This file allows the user to select the file (from their computer) to upload to the web server. Once they select the file they want to upload, they click the upload button and the form calls the uploadexmple.asp

2) uploadexmple.asp: This page takes the file to be uploaded and performs the actual uploading process by using an Upload function within the upload.asp file. Once the upload is complete, this form displays the confirmation message (or error message).

3) upload.asp: This file contains the FileUploader class and the UploadedFile class. These classes are used to perform the actual upload from the client machine to the web server.

Instructions to install - 1) Place all three ASP files under the same folder within an IIS virtual directory (on your website). Note: The web folder that the ASP files reside in MUST have permission to create text files. Check these permissions in IIS.

point64