 |
|

|
It is FREE and definitely does a good job.
Leep Boon, Tang
|
|
|
|
|

|
In the attach code objUpload.Files.Count is 0
please help
|
|
|
|

|
Hai All
I am using vbsUpload.asp to upload my file to the server but it shows an error Microsoft VBScript runtime (0x800A01FA)
Class not defined: 'vbsUpload'
In my reg.asp, I am calling this vbsUpload file.
I am having all files in a folder namely "Website" in which reg.asp and vbsupload.asp also stored.
Please help me where i am going wrong.Partial Code is also attached. Error line also mentioned and showed here
Content of my reg.asp
***********************
<html xmlns="http://www.w3.org/1999/xhtml>
<form name="form1" method="post" ENCTYPE="multipart/form-data" action="reg.asp">
</HTML>
<%
<!-- #include file="vbsUpload.asp" -->
dim sName, sEmail,sLoc,sCountry,sPhone,sExp,sFunct,sIndus,sSkill,sBasic, sPG,sPosition,sPath
dim oCdoMail, oCdoConf, sConfURL
dim sCollectAll,foo,k
if Request.Form("Action") = "Send" then
sName = Request.Form("Name")
sEmail = Request.Form("email")
sSkill = Request.Form("skill")
sBasic = Request.Form("Basic")
sPG = Request.Form("PG")
sPosition= Request.Form("MnuPos")
sPath= Request.Form("fattach")
Dim objUpload, lngLoop
If Request.TotalBytes > 0 Then
Set objUpload = New vbsUpload 'ERRor line is here
For lngLoop = 0 to objUpload.Files.Count - 1
objUpload.Files.Item(lngLoop).Save sPath
Response.Write "File Uploaded"
Next
'other code continues
End if
End if
R.Sasikumar
|
|
|
|

|
Im new to asp and i downloaded and make the changes,but its not working,can anyboby help me on writing the atabase connection on this as an example
Plz help
rani
|
|
|
|

|
Hi all,
recently i started to develop some kind of monitors of windows servers. I started using ftp to transfer state changes of disks, processes and services... the monitors work ok..the file transfer is where it fails sometimes. Then i thought: why not use http to transfer the files? it sounded ok.
Now the problem is : how the hell do i do it?
I have this code (from the vbs side):
On Error Resume Next
'Declare variables
Dim objRequest
Dim URL
Set objRequest = CreateObject("Microsoft.XMLHTTP")
'Put together the URL link appending the Variables.
URL = "http://nribeiro2/portais/uploadfile2/Event_File.asp"
'Open the HTTP request and pass the URL to the objRequest object
objRequest.open "POST", URL , True
'Send the HTML Request
objRequest.Send "c:\Urso.ppt"
'Set the object to nothing
Set objRequest = Nothing
and this code from the Process_File.asp
well, in this code i just removed the UI part of the script the rest is intact.
Can someone help me? Please?
Thanks,
Nelson Ribeiro.
|
|
|
|

|
I am uploading 3 files at a time and when i ask for all three I get the following error
Request object error 'ASP 0104 : 80004005'
Operation not Allowed
../CodeLibrary/upload/vbsUpload.asp, line 34
151k pdf , a small png and 71k doc file
Any ideas please
|
|
|
|

|
This nagesh,
i am fresher working on asp.In my module i have user page in that user has the facility to upload file and upload image option.
And in Admin side i want display reports so that when admin clicks on file link it should be downloaded.
i am using Macromedia with asp and sql server2000 plz help me to do the same.
thank you very muchhh
Nagesh
|
|
|
|

|
hi
im doing a project using asp .net and using vb script as front end and ms access as backend.i have a problem that i want to display an excel sheet in excel format in the browser as read only. i dont know how to perform this...
Can anyone help me....
|
|
|
|

|
Hi, this script to upload a file using ASP is very simple and useful. Thanks anyway. But i have a question now, how can i haev some script which i can get the name of the file uploded? coz i wish to store this file name in my DB for 'download' page to function.
Kindly please help me on this matter.... thanks a lot
|
|
|
|

|
thanks alot for this script! comes in handy when you have to work on an old POS website!!!
many thanks
|
|
|
|

|
The code is very nice and helpful. i want to apply these changes :
1) restrict to upload only one file.
2) types only .txt and .doc
3) replace the uploaded file or update it.
4) view the file.
5) size shud be 1 mb
i m using SQl server Db
Please any one can send me the code on
: mervin_ds@yahoo.com
Its urgent !!!!!!!!!!
mervin
|
|
|
|
|

|
When I execute process_file.asp I get the following error:
Microsoft VBScript runtime (0x800A004C)
Path not found
/upload/vbsUpload.asp, line 234
What is the mistake I am doing? Please guide me.
|
|
|
|

|
I have tried to upload a file to the database using Process_db.asp and it worked fine. However I tried to use the same form to upload two files and I can't seem to get it working. These are the statements I added(in bold):
if getdata("select top 0 * from " & DB,RS) > -1 then
rs.AddNew
rs.Fields("doc_name") = objUpload.Files.Item(0).FileName
rs.Fields("doc_type") = objUpload.Files.Item(0).ContentType
RS("doc_data").AppendChunk objUpload.Files.Item(0).Blob
rs.Fields("doc_name") = objUpload.Files.Item(1).FileName
rs.Fields("doc_type") = objUpload.Files.Item(1).ContentType
RS("doc_data").AppendChunk objUpload.Files.Item(1).Blob
rs.Update
Else
Response.Write "Error"
Response.End
end if
|
|
|
|

|
Hi guys,
i am new to asp and i am using this code on the server side to receive the file which is being posted by a client using HTTP POST multipart/formdata.
i tried using this module and it works just fine. (i have removed all the UI on the Process_File.asp)
<%@ Language=VBScript %>
<!-- #include file="vbsUpload.asp" -->
<form method=post
enctype="multipart/form-data"
action=<%=request.servervariables("script_name")%>>
</form>
<%
Dim objUpload, lngLoop
If Request.TotalBytes > 0 Then
Set objUpload = New vbsUpload
For lngLoop = 0 to objUpload.Files.Count - 1
'If accessing this page annonymously,
'the internet guest account must have
'write permission to the path below.
objUpload.Files.Item(lngLoop).SaveAs "D:\Fwds\WebSite1" & "\", "bill.txt"
Response.Write "File Uploaded"
Next
End if
%>
i am sending some parameters along with the file like the content type, filename to be used on the server side from the client.
i want to receive those parameters and use them on the server side. How shud i go abut it?
|
|
|
|

|
Hi, is it possible to modify the script slightly to rename the file as it's uploaded? The new name will be bassed on other fields during the upload.
Thanks
|
|
|
|

|
Hello everyone who have posted on this forum!
I am totally a newbie to this. I just downloaded the zip file, unzipped it and copied all the files in the zip folder on the webserver. I absolutely did not make any changes to any of the files.
Now, using Internet Explorer when I open Process_File.asp I get the following error:
Error Type:
Sun ONE ASP VBScript compilation (0x800A0422)
'Default' specification can only be used on Property Get
vbsUpload.asp, line 174, column 25
Line 174 is: Public Default Function Item(Index)
I looked this error on msdn and did not find any information on how to troubleshoot it. MSDN just says "You used the Default reserved word on a Property Let or Property Set. You can only specify the Default reserved word for a Property Get."
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/8499d363-c6e4-4a6d-97b7-52650b7e25d7.asp
I have seen posts that this script works great. However, I got the error at the very first step. Can anyone please tell me how to make this script work?
My email address is elitedude2001@yahoo.com
|
|
|
|

|
Sorry my English. The program work very well, but when I want save the binary file (Read the database file) to the disk, the file is encrypted and is not excel format. I need help to solution this problem. Thanks
Rui Moreira
|
|
|
|

|
Hi all,
like I said before, I have found this article and the files within very helpfull. But as I started to explore them in order to build my own site, I have discovered that there is a nice functionality that is not present on this.
Let´s say that I want to upload JPG files to a database and want to display them in a nice web page. Question is: how do I do that?
Any ideias? I have tried several things, but since I am not a real programmer (just an interested guy) I found that I wasn´t able to do it.
Can someone help me?
Thanks,
nelson.
|
|
|
|

|
Hi all,
I have a posto below with a problem in the download.asp file.
I have figured it out and here is the corrected download.asp file:
******************************************************************
<!--#include file ="conn.asp"-->
<%
if getData("select * from doc_warhouse where doc_name <> '' and doc_id='" & request("doc_id") & "'",rs) > 0 then
Response.ContentType = rs("doc_type")
Response.AddHeader "Content-Disposition", "filename=" & rs("doc_name")
Response.BinaryWrite rs("doc_data")
Else
%>
<HTML><BODY>File not found in the database.</BODY></HTML>
<%
End If
%>
***********************************************************************
Hope this helps,
Nelson Ribeiro.
|
|
|
|

|
I found your class very useful and have added a GetText() function for ease of use with Text processing.
Public Function GetText()
if m_strContentType = "text/plain" Then
Dim lngLoop, strOut
For lngLoop = 1 to LenB(m_Blob)
strOut = strOut & Chr(AscB(MidB(m_Blob, lngLoop, 1)))
Next
GetText = strOut
else
GetText = "Wrong Content type! (content type: " & m_strConectType & ") (required type: text/plain)"
End if
End Function
Thank you,
Ryan
.:~Analyst Developer~:.
|
|
|
|

|
hi all,
first of all, I would like to give credit to the guy that wrote these files.
The code is excelent (althought I don´t understand much of ASP I can recognize a good piece of code when I see it).
Because I am a newbie to ASP, I really need some help to understand and correct the behaviour I am getting from these pages.
Here are a couple of things:
1) the download.asp page doesn´t work for me, I mean I get an error in the following SQL statement:
if getData("select * from doc_warhouse where doc_name <> '' and doc_id=" & request("doc_id"),rs) > 0 then
Response.ContentType = rs("doc_type")
....
I have changed it to:
if getData("select * from doc_warhouse where doc_name <> ''",rs) > 0 then (...)
The problem is that I don´t know if the result is the expected behaviour or not.
2) On the other hand, everytime i try to upload a file to the database, I get a window like the ones that appear when we are trying to download a file, althought the file is recorded to the database...a bit strange.
3) How can I retrieve a specific file from the database and show it the browser? I don´t know why but in my case it tries do download/view always the first file in the database.
I could really use some help on this....
Thanks in advance,
Nelson Ribeiro.
|
|
|
|

|
If you had enabled "Client Side debugging" under IIS, you should get a :
"Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument
vbsupload.asp, line 270"
On the current file version the error is locate on line 236 :"objFSOFile.Write Chr(AscB(MidB(m_Blob, lngLoop, 1)))"
So I suggest to add an "On errror resume Next" at the beginning of the sub Save
|
|
|
|

|
see the following article:
http://www.codeproject.com/aspnet/multiuploads.asp
the lines to save the file are:
string fn = System.IO.Path.GetFileName(HIF.PostedFile.FileName);
HIF.PostedFile.SaveAs(baseLocation + fn);
2 lines compared to i don't know how many in VBS.
|
|
|
|

|
Hi, i've found the class works very good to save file
how can i access to the name property of a form element ?
I thought it can be done using
objUpload.Form.Item(n).Name
but it doesn't work
i see the name is stored into the form collection but i can't retrieve it
Else 'It is a form element
.....
'Add the element to the collection
Response.Write(strName)
m_objForm.Add strName, strValue
please tell me what's wrong...
thanks
Giuliano.
|
|
|
|

|
I use vbsUpload.asp to upload file to database ,when the image file size is in ODD,there be always 1 byte lost when get images from database so it can't normally be shown,so I correct it from Line 93,the total size must PLUS 1,
'Get the Content
lngPosBeg = lngPosEnd + 4
lngPosEnd = InStrB(lngPosBeg, strBRequest, strBBoundary) - 2
strBContent = MidB(strBRequest, lngPosBeg, lngPosEnd - lngPosBeg+1)
that is last line,after that i can catch image from database with no error,please check it.
|
|
|
|

|
Hi,
I want to get the name of each field in the form collection. So I tried the following code:
1: for i = 0 to objUpload.Form.count - 1
2: response.write "i: " & i & " "
3: response.write "Value: " & objUpload.Form.Item(i) & " "
4: response.write "Name: " & objUpload.Form.Item(i).name & " "
5: next
I get an error at line 4 saying:
<<
Runtime error in Microsoft VBScript- error'800a01a8'
Object needed: '[string: "emp"]'
/sendMail.asp, line 15
>>
(translated the error messages as good as i can)
But this code gives me the value for i in the form collection (that was emp) but not the name. Now I wonder where is the bug in my Head or in the vbsUpload.asp.
Does Anybody has a solution for my Problem
(using w2k Prof)
Thanks in advance
Alex
|
|
|
|

|
I'm trying to upload a two files and send the files as attachement.
The code below pretty simple to upload the files, but doesn't work for me ...
any clue is appreciated
-Pankaj
<%@ Language=VBScript %>
<!-- #include file="vbsUpload.asp" -->
<form method=post
enctype="multipart/form-data"
action=<%=request.servervariables("script_name")%>>
Your File: <input type=file name=YourFile>
<input type=submit name=submit value="Upload">
</form>
<%
Dim objUpload, lngLoop
If Request.TotalBytes > 0 Then
Set objUpload = New vbsUpload
For lngLoop = 0 to objUpload.Files.Count - 1
'If accessing this page annonymously,
'the internet guest account must have
'write permission to the path below.
objUpload.Files.Item(lngLoop).Save "c:\Newupload\"
Response.Write "File Uploaded"
Next
End if
%>
|
|
|
|

|
I can't seem to get the objUpload.Files.Count to ever go above 0. I have tried this form on multiple servers and get nada. Any suggestions or help would be much appreciated.
|
|
|
|

|
Hi,
how to get the values from the a select box that allows multiple values. If i use request.form("mySelBox") if give back something like e.g.: 1,2,3,4. But if i use objUpload.Form.Item("mySelBox") it gave back just the last value. Is there any chance to get the other values.
Thanks for your help
ALex
|
|
|
|

|
If this is used inconjuction with other form fields (input boxes, select boxes, etc. ) the scripting dictionary no longer allows access of the fields via normal request method (request("company")=""). How do you access other form elements? Roland
|
|
|
|
 |