ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month!

Download and Activate to enter!
Receive the tools necessary to be the rock star of your field. Our 12-month program teaches you the evolving world of multi-channel marketing as well as the complex issues and opportunities found in the industry.
Web development can be a daunting task, even for specialists. There is a lot of information to absorb and a lot of technologies to learn in order to manage a superior website. When trying to learn the ropes, developers need a reliable source to introduce new ideas that can be easily implemented. When working on large projects, even web veterans may run into a technology or an aspect of a technology that they are unfamiliar with.

Download to Enter | Contest Rules

Learn More!

Tutorials | Forums

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 May 22nd, 2006, 10:40 PM
Tmdev Tmdev is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 3 Tmdev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 52 m 54 sec
Reputation Power: 0
Upload just native files of extension x,y,z

I like the upload script but want to simply upload some txt, mdb, xls and doc files.

Do you have a version that allows simply the upload of native docs that does not check for images and size of images?

Also, after I select UPLOAD, the results page show the browse buttons repeated. I would just like to show the results and then a button that hrefs to another asp page, is that possible and how?

Thanks,
TM

Reply With Quote
  #2  
Old May 23rd, 2006, 03:49 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information
 
Join Date: Sep 2004
Location: Israel
Posts: 31,109 Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)  Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6
Time spent in forums: 3 Months 3 Weeks 2 Days 20 h 18 m 8 sec
Reputation Power: 2919
(this post was originally part of this thread)

you don't have to use all those features, the code can be used as ordinary upload script.
example of using it without any image related code:
Code:
If Request("action")="1" Then
	Set objUpload=New ShadowUpload
	If objUpload.GetError<>"" Then
		Response.Write("sorry, could not upload: "&objUpload.GetError)
	Else  
		Response.Write("found "&objUpload.FileCount&" files...<br />")
		For x=0 To objUpload.FileCount-1
			Response.Write("file name: "&objUpload.File(x).FileName&"<br />")
			Response.Write("file type: "&objUpload.File(x).ContentType&"<br />")
			Response.Write("file size: "&objUpload.File(x).Size&"<br />")
			Call objUpload.File(x).SaveToDisk(Server.MapPath("Uploads"), "")
			Response.Write("file saved successfully!")
			Response.Write("<hr />")
		Next
		Response.Write("thank you, "&objUpload("name"))
	End If
End If

however, the code is not 100% stable as I got reports of certain files that could
not be uploaded. for general upload, as long as you also don't have to rename the
uploaded files, use this upload script:
http://www.asp101.com/articles/jacob/scriptupload.asp
by the way how did you find this thread? couldn't find it on top of google results..

as for your second question, you can have such code:
Code:
<% If Request("action")="" Then %>
<form action="<%=Request.ServerVariables( "Script_Name" )%>?action=1" enctype="multipart/form-data" method="POST">
File1: <input type="file" name="file1" /><br />
File2: <input type="file" name="file2" /><br />
File3: <input type="file" name="file3" /><br />
Name: <input type="text" name="name" /><br />
<button type="submit">Upload</button>
</form>
<% Else %>
<a href="page2.asp">next page</a>
<% End If %>

Last edited by Shadow Wizard : January 18th, 2007 at 06:16 AM.

Reply With Quote
  #3  
Old September 13th, 2006, 03:48 AM
shem's Avatar
shem shem is offline
Shemzilla
ASP Free Loyal (3000 - 3499 posts)
 
Join Date: Aug 2005
Location: Table View, Cape Town, S.A
Posts: 3,397 shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 17744 Folding Title: Novice Folder
Time spent in forums: 2 Weeks 5 Days 12 h 38 m 38 sec
Reputation Power: 554
Shadow, can this script be modified to upload anything? i want to upload .xml and .txt files...

Shem
__________________
Everyone has a photographic memory. Some don't have film.
I am a nobody, nobody is perfect, therefore I am perfect.


Reply With Quote
  #4  
Old September 13th, 2006, 05:55 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information
 
Join Date: Sep 2004
Location: Israel
Posts: 31,109 Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 29th Grade (Above 100000 Reputation Level)  Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2595929 Folding Title: Super Ultimate Folder - Level 6
Time spent in forums: 3 Months 3 Weeks 2 Days 20 h 18 m 8 sec
Reputation Power: 2919
yes the only thing that prevent saving non image files are those lines:
Code:
If (objUpload.File(x).ImageWidth>200) Or (objUpload.File(x).ImageHeight>200) Then
				Response.Write("image to big, not saving!")
			Else  
				Call objUpload.File(x).SaveToDisk(Server.MapPath("Uploads"), "")
				Response.Write("file saved successfully!")
			End If

change them to this for example and any file will be saved to disk:
Code:
Call objUpload.File(x).SaveToDisk(Server.MapPath("Uploads"), "")
Response.Write("file saved successfully!")

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Shadow Uploader - uploading any file (not only images)


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 | 
  
 



Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap