aspSmartUpload.SmartUpload doesnt save my file?

J

Jake

Hi group,

I am trying to build a page that allows uploading
My ISP only supports Smartupload
I am testing on a small hubbed local network, with PWS
Any help is appreciated.
---------------------
'rqstupl.asp contents

<HTML>
<BODY BGCOLOR="white">
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="txtupl.asp">
<INPUT TYPE="FILE" NAME="FILE1" SIZE="50"><br>
<INPUT TYPE="SUBMIT" VALUE="Upload">
</FORM>
</BODY>
</HTML>
-------------
input in form = usblog.txt
-------------
'txtupl.asp contents
<%
response.write "txtupl<br>"
Dim myUpload 'declare the component
Dim intCount ' count the number of uploaded files
Dim File 'declare the file to upload
dim item, fic, i
intCount=0 'initialize the counter

' error managment
'On Error Resume Next

'component creation
Set myUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

'limit the file size to 50 Kb
myUpload.MaxFileSize = 50000

' limit the file extensions to pictures files
myUpload.allowedFilesList="txt,gif,jpg"

'Select files on the user computer
myUpload.Upload

Response.Write("Number of files =" & myUpload.Files.count&"<BR>")

' checking all the files
For each file In myUpload.Files
Response.Write("Name =" & File.FileName&"<BR>")
Response.Write("Size =" & File.Size&"<BR>")
' presence test
If not File.IsMissing then
' ---------------here sits the trouble
'
i = Server.MapPath("database/msgs/") & file.FileName
response.write (i) & "<br>"
file.SaveAs( i )
' -----------------------------
'
If Err.Number=0 then
direction="saved"
Else
direction="error: " & Err.description
End if

end if
Next

Set myUpload=nothing

' error managment

' redirect to the result display
Response.write direction
%>
------------------
'response output screen

txtupl
Number of files =1
Name =usblog.txt
Size =89
D:\Inetpub\wwwroot\database\msgsusblog.txt
saved

-----------
I have been trying to modify the "save" line to any construction to no aval.
Everything works, I can access all the properties of "file."
I have no error responses or script aborts.
Asp handling works, vbscript and jscript works
The destination folder is writable, I have another asp testing page that creates and modifies a file on that folder.

--------- The one thing that doesnt work: there is no file created! --------------

I am using Win98SE, PWS installed, testing application on a second pc, locally hubbed.
What am I missing?

Thanks in advance
 
J

Jake

Hi group,

I am trying to build a page that allows uploading
My ISP only supports Smartupload
I am testing on a small hubbed local network, with PWS
Any help is appreciated.
---------------------
'rqstupl.asp contents

<!-- to prevent execution in newsgroup !
<HTML>
<BODY BGCOLOR="white">
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="txtupl.asp">
<INPUT TYPE="FILE" NAME="FILE1" SIZE="50"><br>
<INPUT TYPE="SUBMIT" VALUE="Upload">
</FORM>
</BODY>
</HTML>
-------------
input in form = usblog.txt
-------------
'txtupl.asp contents
<%
response.write "txtupl<br>"
Dim myUpload 'declare the component
Dim intCount ' count the number of uploaded files
Dim File 'declare the file to upload
dim item, fic, i
intCount=0 'initialize the counter

' error managment
'On Error Resume Next

'component creation
Set myUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

'limit the file size to 50 Kb
myUpload.MaxFileSize = 50000

' limit the file extensions to pictures files
myUpload.allowedFilesList="txt,gif,jpg"

'Select files on the user computer
myUpload.Upload

Response.Write("Number of files =" & myUpload.Files.count&"<BR>")

' checking all the files
For each file In myUpload.Files
Response.Write("Name =" & File.FileName&"<BR>")
Response.Write("Size =" & File.Size&"<BR>")
' presence test
If not File.IsMissing then
' ---------------here sits the trouble
'
i = Server.MapPath("database/msgs/") & file.FileName
response.write (i) & "<br>"
file.SaveAs( i )
' -----------------------------
'
If Err.Number=0 then
direction="saved"
Else
direction="error: " & Err.description
End if

end if
Next

Set myUpload=nothing

' error managment

' redirect to the result display
Response.write direction
%>
------------------
'response output screen

txtupl
Number of files =1
Name =usblog.txt
Size =89
D:\Inetpub\wwwroot\database\msgsusblog.txt
saved

-----------
I have been trying to modify the "save" line to any construction to no aval.
Everything works, I can access all the properties of "file."
I have no error responses or script aborts.
Asp handling works, vbscript and jscript works
The destination folder is writable, I have another asp testing page that creates and modifies a file on that folder.

--------- The one thing that doesnt work: there is no file created! --------------

I am using Win98SE, PWS installed, testing application on a second pc, locally hubbed.
What am I missing?

Thanks in advance
-->
 
J

Jake

Hi group,

Finally got posted the message ok, not used to post <<html>> contents
So here we go:

I am trying to build a page that allows uploading
My ISP only supports Smartupload
I am testing on a small hubbed local network, with PWS
Any help is appreciated.
---------------------
'rqstupl.asp contents
'had to use "<<" to prevent page showing as webpage

<<HTML>
<<BODY BGCOLOR="white">
<<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="txtupl.asp">
<<INPUT TYPE="FILE" NAME="FILE1" SIZE="50"><br>
<<INPUT TYPE="SUBMIT" VALUE="Upload">
<</FORM>
<</BODY>
<</HTML>
-------------
input in form = usblog.txt
-------------
'txtupl.asp contents
<%
response.write "txtupl<br>"
Dim myUpload 'declare the component
Dim intCount ' count the number of uploaded files
Dim File 'declare the file to upload
dim item, fic, i
intCount=0 'initialize the counter

' error managment
'On Error Resume Next

'component creation
Set myUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

'limit the file size to 50 Kb
myUpload.MaxFileSize = 50000

' limit the file extensions to pictures files
myUpload.allowedFilesList="txt,gif,jpg"

'Select files on the user computer
myUpload.Upload

Response.Write("Number of files =" & myUpload.Files.count&"<BR>")

' checking all the files
For each file In myUpload.Files
Response.Write("Name =" & File.FileName&"<BR>")
Response.Write("Size =" & File.Size&"<BR>")
' presence test
If not File.IsMissing then
' ---------------here sits the trouble
'
i = Server.MapPath("database/msgs/") & file.FileName
response.write (i) & "<br>"
file.SaveAs( i )
' -----------------------------
'
If Err.Number=0 then
direction="saved"
Else
direction="error: " & Err.description
End if

end if
Next

Set myUpload=nothing

' error managment

' redirect to the result display
Response.write direction
%>
------------------
'response output screen

txtupl
Number of files =1
Name =usblog.txt
Size =89
D:\Inetpub\wwwroot\database\msgsusblog.txt
saved

-----------
I have been trying to modify the "save" line to any construction to no aval.
Everything works, I can access all the properties of "file."
I have no error responses or script aborts.
Asp handling works, vbscript and jscript works
The destination folder is writable, I have another asp testing page that creates and modifies a file on that folder.

--------- The one thing that doesnt work: there is no file created! --------------

I am using Win98SE, PWS installed, testing application on a second pc, locally hubbed.
What am I missing?

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top