|
| |
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
upload many files to DataBase - 7/23/2005 9:11:10
hi, I would like to upload some files to the server (asp) and insert them to my database, does anyone can help me with that? Elen
|
|
|
|
Eli
Posts: 2658 From: ... er ... Status: offline
|
RE: upload many files to DataBase - 7/23/2005 12:48:46
you mean you want to upload files and insert the locations of the files into the database? Try this: http://www.freeaspupload.net/
_____________________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 7/23/2005 13:12:40
I would like to upload some files the a specific directory , that mean that I want to be able to choose the directory and upload files to that directory. But I want to use a code to not a software that someone wrote
|
|
|
|
rdouglass
Posts: 9269 From: Biddeford, ME USA Status: offline
|
RE: upload many files to DataBase - 7/23/2005 15:00:22
I have code that will upload multiple files from the same form but it doesn't allow the user to choose the directory. You probably could do that but the difficulty lies in ensuring the user has proper priviledges for that directory. There also is some risk in showing the user the names and paths of the directories that have upload priv's. That can increase the risk of malicious upload. Forcing the directory doesn't negate that risk, just decrease it. It is based on the scripts here: http://www.asp101.com/articles/jacob/scriptupload.asp Hope it helps.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 7/24/2005 5:01:31
Is there another way to upload multiple files? any ideas?
|
|
|
|
rdouglass
Posts: 9269 From: Biddeford, ME USA Status: offline
|
RE: upload many files to DataBase - 7/25/2005 11:16:58
quote:
Is there another way to upload multiple files? any ideas? Can you be very specific as to what you want to do and what it would look like?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 7/27/2005 15:42:23
I would like to create a folder (this i did with objFSO) and my problem is to upload some files to that directory How do I do it? I can upload 1 file to a cerain directory like spooki gave at the start of this page but I it's not good enough please help me
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 7/31/2005 4:15:32
Still can't do it. I created a folder with the person name and I would like to upload a file to that directory, I don't know how to choose that directory, I can choose the name from a combo box but how am I trnasfer it to the uplaod.asp code , I need help about it
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 8/3/2005 4:08:35
anyone???????????
|
|
|
|
rdouglass
Posts: 9269 From: Biddeford, ME USA Status: offline
|
RE: upload many files to DataBase - 8/3/2005 11:35:16
What code are you currently using for uploading your files?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 8/3/2005 14:51:55
I am using the code that spooky gave upload.zip and the code look like<!--#include file="code/clsupload.asp"-->
<%
'#===========================
'# Allowable file extensions
'#===========================
sAllowedFiles = "zip,jpg,gif"
'#===========================
'# Upload size max in bytes
'#===========================
iUplSize = 200000
'#===========================
'# File path (based on the root of your web)
'#===========================
sUploadPath = "/uploads"
'#===========================
'# Name of the text box that the
'# file name will be saved to.
'#===========================
TextBox = "Upload"
Set Upload = New clsUpload
FileName = Upload.Fields("FileName").FileName
Ext = Upload("FileName").FileExt
if inStr(uCase(sAllowedFiles),uCase(Ext)) > 0 then
If Upload("FileName").Length <= iUplSize then
Folder = Server.MapPath(sUploadPath) & "\"
FileName = Upload.UniqueName(Folder, FileName)
Upload("FileName").SaveAs Folder & FileName
Else
errmessage = "File must be less than "& iUplSize/1000 & " kb"
End if
else
errmessage = "File type not supported."
end if
Set Upload = Nothing
%>
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function copyForm() {
opener.document.Upload.<%=TextBox%>.value = document.popupForm.FileName.value;
document.popupForm.submit();
window.close();
return false;
}
//-->
</SCRIPT>
</HEAD>
<%If len(errmessage) > 0 then%>
<BODY>
<%=errmessage%>
<%Else%>
<BODY onLoad="return copyForm()">
<FORM NAME="popupForm" onSubmit="return copyForm()">
<INPUT TYPE="TEXT" NAME="FileName" value="<%=FileName%>">
<INPUT TYPE="BUTTON" VALUE="Submit" onClick="copyForm()">
</FORM>
<%end if%>
</BODY>
</HTML>
|
|
|
|
rdouglass
Posts: 9269 From: Biddeford, ME USA Status: offline
|
RE: upload many files to DataBase - 8/3/2005 16:34:36
quote:
'#=========================== '# File path (based on the root of your web) '#=========================== sUploadPath = "/uploads" That's where it's done. You'd need to change that to grab the dropdown selection and place it in the script for the variable "sUploadPath" and of course, ensure the folder is writeable.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 8/4/2005 7:52:49
I know that what I need to do and that's the exact problem because the path is constant and my question is how to make it as a drop down list or I need to get the path from another ASP file (something like request.form)
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 8/4/2005 17:24:42
thanks for your support but this is not what i was looking for. I create a form and when then client fill the form, it create a folder with the person name so he can upload as many picture as he wants, so you see I don't know the folders name. i can send the person name (the same as the folder name) to another ASP page, can I use your code and choose another folder from a diffrent ASP file? (like a request.form)?
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 8/4/2005 17:41:18
no I am not using with session becasue only 1 person is uploading the pictures but he upload a diffrent person everytime
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 8/4/2005 18:38:15
yes that's what I need
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 8/4/2005 19:05:39
Sorry I didn't get your point. How do I send to your upload.asp the name? and how do I use the path with the name I got ?
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 8/5/2005 7:03:33
at your example (upload.zip) am I doing it at the file upload.asp or upload_demo.htm? (this is my first time using these application)
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: upload many files to DataBase - 8/7/2005 17:58:55
Thanks I'll try it.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|