| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#46
|
|||
|
|||
|
i found another thread about the problem im having, but it never got resolved..
Im just trying to send an email with some form data in it when the file gets uploaded and am getting this error... Microsoft VBScript runtime error '800a01a8' Object required: 'm_Request' /cm/Galleries/ShadowUploader.asp, line 29 Code:
<%
Dim objUpload
Set objUpload = New ShadowUpload
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 />")
Response.Write("Image width: "&objUpload.File(x).ImageWidth&"<br />")
Response.Write("Image height: "&objUpload.File(x).ImageHeight&"<br />")
If (objUpload.File(x).ImageWidth>2000) Or (objUpload.File(x).ImageHeight>2000) Then
Response.Write("Image to big, not saving!")
Else
Call objUpload.File(x).SaveToDisk(Server.MapPath("../Uploads"), "")
Response.Write("File saved successfully!")
End If
Response.Write("<p>")
Next
Response.Write("Thank you. Your image is now being processed "&objUpload("strname"))
End If
End If
Const cdoSendUsingMethod = _
"http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort = 2
Const cdoSMTPServer = _
"http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort = _
"http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout = _
"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate = _
"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic = 1
Const cdoSendUserName = _
"http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword = _
"http://schemas.microsoft.com/cdo/configuration/sendpassword"
Dim objConfig ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields ' As ADODB.Fields
' Get a handle on the config object and it's fields
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
' Set config fields we care about
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail.djrclub17.com.au"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 10
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "msilk@djrclub17.com.au"
.Item(cdoSendPassword) = "fattestt"
.Update
End With
Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
With objMessage
.To = "msilk@djrclub17.com.au"
.From = "Club17 Gallery"
.Subject = "Image Uploaded"
.TextBody = "" & objUpload("strname")
.Send
End With
Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
%>
<form action="<%=Request.ServerVariables( "Script_Name" )%>?action=1" enctype="multipart/form-data" method="POST">
<table width="448" border="0" cellpadding="0" cellspacing="0" background="../images/grey_bg.gif" bgcolor="#F2F2F2">
<tr bgcolor="#F2F2F2">
<td colspan="6"><img src="../images/tran.gif" width="13" height="13"></td>
</tr>
<tr bgcolor="#F2F2F2">
<td width="13" rowspan="4" align="left" valign="top"><img src="../images/tran.gif" width="13" height="13"></td>
<td height="14" colspan="4" valign="top">Want to <span class="fontblack">Submit An Image</span> to one of our<span class="fontblack"> Fan Galleries</span>? Do it here. </td>
<td width="13" rowspan="4" align="right" valign="top"><img src="../images/tran.gif" width="13" height="13"></td>
</tr>
<tr bgcolor="#F2F2F2">
<td colspan="4"><img src="../images/tran.gif" width="180" height="8"></td>
</tr>
<tr bgcolor="#F2F2F2">
<td colspan="2" class="fontblack">Your Name: </td>
<td width="230" class="fontblack">Your Image: </td>
<td width="41"> </td>
</tr>
<tr>
<td width="147"><input name="strname" type="text" id="name"></td>
<td width="4"> </td>
<td><input name="file1" type="file" /></td>
<td align="left">
<div align="left">
<input name="submit" type=IMAGE id="submit2" src="../images/send_image.gif" width="41" height="17">
</div></td>
</tr>
<tr bgcolor="#F2F2F2">
<td colspan="6"><img src="../images/tran.gif" width="13" height="13"></td>
</tr>
</table>
</form>
|
|
#47
|
||||
|
||||
|
don't call this line twice:
Code:
Set objUpload = New ShadowUpload this is mistake. you get error because you're using the upload object before you clicked the submit button: you don't have any data yet - another basic mistake in the logic. you can use the upload component only after you have data i.e. only after clicking the submit button, that's why I have such line in the code: Code:
If Request("action")="1" Then
it's not just for fun, it's there for good reason. you have to put all the code inside that If..Then block. |
|
#48
|
|||
|
|||
|
I understand that i must be very frustrating to you. But I do not pretend to know what im doing... i am a complete novice when it comes to this stuff and i just need it done.
I was asked to build this website for this Supporters Club with what little knowledge i have, and im doing my best... If you could just tell me exactly what i need to know to make this code work i will be very grateful, and i'll get out of your hair. I am not a programmer, im an electrician... I removed the second instance of that line, and still get the same error.. What exactly do you mean by 'place the code inside the 'if...then' block because when i did that it gave me an 'Expected Then' error Code:
</form>
<%
Dim objUpload
Set objUpload=New ShadowUpload
If Request("action")="1" Then
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 />")
Response.Write("Image width: "&objUpload.File(x).ImageWidth&"<br />")
Response.Write("Image height: "&objUpload.File(x).ImageHeight&"<br />")
If (objUpload.File(x).ImageWidth>2000) Or (objUpload.File(x).ImageHeight>2000) Then
Response.Write("Image to big, not saving!")
Else
Call objUpload.File(x).SaveToDisk(Server.MapPath("../Uploads"), "")
Response.Write("File saved successfully!")
End If
Response.Write("<p>")
Next
Response.Write("Thank you. Your image is now being processed "&objUpload("strname"))
End If
End If
%>
<%
Const cdoSendUsingMethod = _
"http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort = 2
Const cdoSMTPServer = _
"http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort = _
"http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout = _
"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate = _
"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic = 1
Const cdoSendUserName = _
"http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword = _
"http://schemas.microsoft.com/cdo/configuration/sendpassword"
Dim objConfig ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields ' As ADODB.Fields
' Get a handle on the config object and it's fields
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
' Set config fields we care about
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail.djrclub17.com.au"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 10
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "msilk@djrclub17.com.au"
.Item(cdoSendPassword) = "fattestt"
.Update
End With
Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
With objMessage
.To = "msilk@djrclub17.com.au"
.From = "Club17 Gallery"
.Subject = "Image Uploaded"
.TextBody = "an image has been uploaded" &objUpload("strname")
.Send
End With
Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
%>
|
|
#49
|
||||
|
||||
|
Quote:
so may I politely ask what are you doing here? when I need to fix my car, I pay to someone that will fix it for me. I won't start messing with it when I know nothing - it's waste of time and of effort. if you're not programmer, you need to hire one that will do the programming for you.. sorry for wasting your time. you need complete code, guidance won't help in your case. |
|
#50
|
|||
|
|||
|
... because this forum is called 'ASP Free forum' where you come for help with ASP. It doesnt say anywhere you have to be an expert programmer to have a go.
We obviously have different ways of looking at things, because i will always try and do something for myself before i go off and pay for someone else to do it. Im not trying to say that im a master. I know i'm not, but i built this entire website... and im pretty damn proud of it. It looks good, it works good, and i have 100's of contributing members that support me all the way. Im not very good at asp code by your standards, but i'm no dummy. There are some things i can figure out, and some things i cant. I'm asking you a favour. You wouldnt help me with your own email component for your upload code, so i went and tried to find another, and ive ALMOST got it to work the way i want it to. It sends an email when the image is uploaded, and all i want it to do is email me the data from the 'strname' field along with the little message. Its very frustrating because i know you know how to do it. All you'd have to do is alter my code a little bit and it would be done and i'd leave you alone, but instead you choose to be difficult and treat me like im an idiot. Not trying to start an argument. I dont know you. But that's how i feel. |
|
#51
|
||||
|
||||
|
We here at Aspfree are there to help people learn not alter and give back their code Shadow is one of the best here and he was trying to Help you
and so are others over here when u don't know something u should politely ask that's how work is done We all over here were novice at sometimes.You know asp but some people here seldom know it then too they try to learn and if u can't be polite then u will never succeed in Aspfree Thanks for Reading if u need to learn it here are some linkshttp://www.w3schools.com Hope u understand what i am trying to explain ![]()
__________________
![]() FriendsIf something is bothering Danceitout. And if u got everything in place Gimme Rep. ![]() Administrator/Software engg in Crestglobal Logistics. |
|
#52
|
|||
|
|||
|
I understand, i have a thread in the asp section where, if you go over it, you'll see that in normal circumstances i would try and learn... But as i stated in that thread, and in this one, The site was launched yesterday and i went back to work today... and i just wanted it to work.
I have never had any formal training from anyone. Everything i know, i learned from reading these forums, and googling... i understand the benefits of learning things yourself... anyway. Ive written on the site now that people need to rename there image files so that i know who theyre from. Ive given up on it, so it doesnt matter now. Im using Shadow's script as a way for people to send me their images files for a fan gallery we have on the site. http://www.djrclub17.com.au/ Last edited by Silky : January 2nd, 2008 at 05:04 AM. |
|
#53
|
||||
|
||||
|
I do understand you Silky and I tried to help as best I could, but you
just failed to understand trivial concepts. you never posted reply to my last question in your other thread, if at some point in the future you'll want it done feel free to read my last reply then and answer it. I'm trying to avoid writing everything for you, because I've learned in the hard way that 99% of the times it's useless and waste of my time: people who are looking for "code favor" will keep doing this forever and will never truly learn or become programmers. the only way to learn is do things yourself. |
|
#54
|
|||
|
|||
|
Silky's point is very wrong. Ofcourse it is a free forum, but we should always use it like a forum. We make our pages, and in case of stuck with a problem in script, we share our code and get helped.
Noone treats here anybody like an idiot. In my eyes, the forum has always been friendly and shadow wizard is The Best. |
|
#55
|
|||
|
|||
|
What's the maximum file size for this script? I would like to be able to upload video files to an internal server...maybe 600 MB or so? Can this script support that? Thanks!
|
|
#56
|
||||
|
||||
|
in theory there is no maximum file size, just make sure to change the
constant in my code and to increase the Script Time Out. |