Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 11th, 2005, 10:34 AM
Xovelono Xovelono is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 31 Xovelono User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 58 m 58 sec
Reputation Power: 4
ASP Image Upload

Okey, here we go.

Some days ago I was asked if I could create an image upload for a very big homepag, it was an offer I coudln't resist.

Though I'm normally using PHP I learnt quite a lot of things now, and understand the language.

But still, I don't know how to create this image upload, I've googled a lot and checked different scripts, including freeaspupload.net and similar things.

Of course I can't take copyrighted source and just put it in, I think that's quite "low". So I'm trying to create an own script, by looking at other scripts and see what does what.

Though I can't seem to find a working solution, for example I've not seen a function to check if the file that's submitted through a html form is an image.

I would really appreciate if someone could show me the basics of an image upload.

It seems that a lot more coding is required for ASP than for PHP, but then again, I might do it the wrong way.

Reply With Quote
  #2  
Old June 12th, 2005, 02:56 PM
Levi Hackwith Levi Hackwith is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 7 Levi Hackwith User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 12 m
Reputation Power: 0
Smile

Hey there! Yea, PHP is a world easier to do with file uploads compared to ASP. I'm going to assume that you are doing this with plain ASP. I've actually got the code for this. The thing is, to do file uploads in plain ASP, you gotta use ASPUpload (http://aspupload.com/). That link will take you to there home page. Secondly, here's the code you're gonna have to use. If you're still confused, stuck or want to give mad props to me just post

Aight man, best of luck to ya'. I feel yer pain.

The code:

Code:
<%
Set Upload = Server.CreateObject("Persits.Upload.1")

Upload.OverwriteFiles = False
On Error Resume Next

Upload.SetMaxSize 1048576	' Limit files to 1MB
Count = Upload.Save(Server.MapPath("/images/avatars/"))
Set File = Upload.Files(1)
For each File in Upload.Files		
   '--- determine which image it is and locate properly
   Select case File.Name
      case "picture"
        'picture is the name of the file input from the form   this was submitted from
         picture = File.ExtractFileName
   End Select
Next	
%>

Reply With Quote
  #3  
Old June 13th, 2005, 08:14 AM
Xovelono Xovelono is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 31 Xovelono User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 58 m 58 sec
Reputation Power: 4
Ok, thanks for answering!

Bad news for me, but at least I know what I gotta do now!

Reply With Quote
  #4  
Old June 14th, 2005, 05:53 PM
DrewPeterson89 DrewPeterson89 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 249 DrewPeterson89 User rank is Lance Corporal (50 - 100 Reputation Level)DrewPeterson89 User rank is Lance Corporal (50 - 100 Reputation Level)DrewPeterson89 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 8 h 20 m 55 sec
Reputation Power: 4
I don't know if asp.net is an option for you, but here is a great tutorial for uploading an image...
http://www.stardeveloper.com/articl...03031201&page=1

If you decide to go with ASP.NET you could use this to code in, rather than shelling out the big bucks for Visual Studio:
http://www.asp.net/Default.aspx?tabindex=0&tabid=1

Last edited by DrewPeterson89 : June 14th, 2005 at 05:56 PM.

Reply With Quote
  #5  
Old June 16th, 2005, 04:01 AM
Xovelono Xovelono is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 31 Xovelono User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 58 m 58 sec
Reputation Power: 4
ASP.NET isn't a possibility for me ( ), but thanks for answering. Also there were a upload using plain asp at the page you gave me, very useful, thanks.

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > ASP Image Upload


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT