472,374 Members | 1,309 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,374 software developers and data experts.

Persist Upload Hatasi Yardim Lütfen

Sitelerden birinde verilen yabancı kaynakli bir scriptti duzenledim
yanlız birseyin içinden bir turlu cıkamadım işin aslı ilk defa
persistin upload componentini kullanacam yanlız suanki haliyle
verdiği hata şu.Bilen arkadaşlar lütfen yardım edin

Persits.Upload.1 error '800a0020'

The system cannot find the path specified.

/classifieds/upload.asp, line 250

sistem dosya yolunu bulamadı.

2 dosyam var
Birinde baglantıların yolunu belirleyen inc_conn.asp
ve upload.asp

inc_conn.asp ' nin içeriği
<!-- METADATA TYPE="typelib"
FILE="C:\Program Files\Common
Files\System\ado\msado15.dll" -->

<%
'==========================================
'CONFIGURATIONS
'==========================================

'DATABASE
'enter 1=DEFAULT SETTING (DATABASE IN db/ folder)
'enter 2=DATABASE IS OUTSIDE CLASSIFIED ADS db/ FOLDER (THEN EDIT THE
DATABASE PATH BELOW)
'enter 3=DSN
'enter 4=SQL SERVER
strDatabaseFile = 1

'IF ABOVE YOU ENTERED 2
'DEFINE DATABASE PATH (ie c:\inetpub\wwwroot\classifieds\db)
'If you don't intend to use the default path
'Contact your host if you don't know it
'IMPORTANT---FOLDER MUST HAVE A WRITE PERMISSION (CONTACT YOUR HOST FOR
INFO)
'remove the ' in the beginning of the line to activate

'strDatabasePath =
"d:\webspace\resadmin\bogazicikonut\bogazicikonut. com.tr\www\classifieds\"

'THE ABSOLUTE PATH TO YOUR CLASSIFIED ADS FOLDER
'Change the Classifieds to directory name if you use another name
strAbsolutePath=
"d:\webspace\resadmin\bogazicikonut\bogazicikonut. com.tr\www\classifieds\"

'SITE NAME
strSiteName = "bogazicikonut.com.tr!"

'DOMAIN EMAIL where user can contact you (Used only in the footer of
every pages)
strInfoEmail = "we*******@bogazicikonut.com.tr"
'UPLOAD-----------------------------

'PHOTO UPLOAD 1=YES 0=NO
UploadOption = 1

'IF UPLOAD = 1 THEN SPECIFY FOLDER (if you use the default folders,
there is no need to edit)
'---FOLDER MUST HAVE A WRITE PERMISSION (CONTACT YOUR HOST FOR INFO)
strUploadFolder =
"d:\webspace\resadmin\bogazicikonut\bogazicikonut. com.tr\www\classifieds\uploads"
strAbsUploadPath = strCatUploadFolder

'IMAGES FOR CATEGORY 1=YES 0=NO ---WILL APPEAR FOR POSTED ADS ON MAIN
PAGE---
strCategoryImage = 1
strCatUploadFolder =
"d:\webspace\resadmin\bogazicikonut\bogazicikonut. com.tr\www\classifieds\uploads"
strAbsCatUploadPath = strCatUploadFolder

'EMAIL----------------------------

'EMAIL OPTION 1=YES 0=NO ---ONLY IF YOUR SITE SUPPORT JMAIL or
ASPMAIL---
'This setting will overide all the others below
strSendEmail = 1

'IF EMAIL OPTION = 1 THEN SPECIFY MAIL COMPONENT
'OPTIONS = "JMAIL" or "ASPMAIL"
strMailComponent = "ASPMAIL"

'IF EMAIL OPTION = 1 THEN SPECIFY MAIL SERVER
strMailServer = "bogazicikonut.com.tr"
strDomainEmail = "ad***@bogazicikonut.com.tr"

'Path to your where you put the classified Ads folder (Used when mail
is sent to user)
strDomain = "www.bogazicikonut.com.tr/classifieds"

'OPTIONAL EMAIL FUNCTIONS
'Will enable the lost password retrieval by email
strSendLostPassword = 1

'Will send registration info to new users
strSendNewUserInfo = 1

'NOTIFY WEBMASTER 1=YES 0=NO ---NOTIFY BY EMAIL---

strNotifyNewAds = 1
strNotifyNewUser = 1

strNameToWebmaster = "Webmaster"
strSendToWebmaster = "we*******@bogazicikonut.com.tr"

Select Case strDatabaseFile
case 1
strConn = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" &
Server.MapPath("db\dbClassifiedsPhoto.mdb")

case 2
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
strDatabasePath & "dbClassifiedsPhoto.mdb; Persist security Info=False"
case 3
strConn = "dsn=dbclassifiedsphoto"

case 4
strConn = "Provider=SQLOLEDB;Data Source=Your_SQL_Server;Initial
Catalog=dbClassifiedsPhoto; User Id=Your_Login_Name;
Password=Your_Password"
End Select

%>


Upload.asp nin içeriği


<%@LANGUAGE="VBSCRIPT"%>
<html>
<head>
<title><%=strSiteName%></title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<meta name="Microsoft Border" content="none">
</head>
<!-- #Include File="Inc_conn.asp" -->
<%
If Session("cAdminUserName") = "" Then
If Session("UserID") = "" Then
Response.Redirect "Login.asp"
Else
If UploadOption = 0 Then
Response.Redirect "MenuForRegisteredUsers.asp"
End If
End If
End If
dim strAction

strAction = CStr(Request.QueryString("action"))

Select Case strAction
Case "Categories"
Categories
Case "Ads"
Ads
Case ""
Response.redirect ("main.asp")
End Select
%>

<body bgcolor="#ffffff" topmargin="0">
<%'-----------------------------------------------------------------
'--------------------------Upload Ads image Function ---------------
Sub Ads
%>
<div align="center">

<table width="80%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td>
<div align="center">
<h3><font face="Verdana, Arial, Helvetica, sans-serif">Upload
Picture</font></h3>
</div>
</td>
</tr>
<tr>
<td>
<div align="center">
<form name="form1" method="POST" enctype="multipart/form-data"
action="upload.asp?Upload=yes&Action=Ads&nAdID=<%= Request("nAdID")%>">
<table width="80%" border="0" cellspacing="0"
cellpadding="2">
<tr>
<td>Upload</td>
<td>
<input type="file" name="file1" size="20">
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="hidden" name="nAdId"
value="<%Request("nAdID")%>">
<font size="2"><i>note: only image files are allowed
and they may not
exceed 100KB, <br>
<br>
click the browse button to select your file, then
right-click
to see the file properties.</i></font></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="submit" name="action" value="Submit">
</td>
</tr>
</table>
</form>
</div>
</td>
</tr>
</table>
<%
strAdId = request("nAdID")
if request("Upload") = "yes" Then

'---------------Upload User Ads Images--------------------

Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.SetMaxSize 100000, False
Upload.SaveVirtual(strUploadFolder)

' <!--bolViolators = False
' For Each File in Upload.Files
' If File.ImageType <> "GIF" and File.ImageType <> "JPG" Then
' bolViolators = True
' Exit For
'End If
'
' If File.ImageWidth > 250 Then
' bolViolators = True
' Exit For
' End If
'
' If File.ImageHeight > 250 Then
' bolViolators = True
' Exit For
' End If
'
' If File.ImageType = "GIF" Then
' strFileExtension = ".gif"
' else
' strFileExtension = ".jpg"
' End If
' Next

Set File = Upload.Files("FILE1")
SaveFileName = strAdId & strFileExtension
File.CopyVirtual SaveFileName
File.Delete

Set Upload = Nothing
'Now, if we didn't have any violating files, say so!
If Not bolViolators then
strSaveFileName = strAdId & strFileExtension
Response.Write "Upload Successful..."
Set rsUploadFile = Server.CreateObject("ADODB.Command")
rsUploadFile.ActiveConnection = strConn
rsUploadFile.CommandText = "UPDATE tblAds SET cFile = '" &
strSaveFileName & "' WHERE nAdId LIKE '" & strAdId & "'"
rsUploadFile.Execute

Set rsUploadFile = Nothing
End if
%>
<% If Not bolViolators then %>
<p><img src="<%=strsaveFileName%>" border="1" ><br>
<font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Uploaded image<br>
To change, browse and resubmit the form above <br>
<a href="javascript:location.reload()"><font
color="#008000">Refresh</font></a> the page to see new image<br>
</font> </p>
<p><font face="Geneva, Arial, Helvetica, san-serif" size="2"><a
href="modifyAds.asp?nUserId=<%=session("UserID")%> "><font
color="#008000">Continue</font></a></font><br>
</p>

<%
Else %>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Sorry,
there was an error<br>
The image is not a .GIF or a .JPG file or is bigger than 20KB<br>
Try again<br>
</font> </p>
<%
End if

End If
%>
<p>&nbsp;</p>
</div>
<% End Sub
'--------------------------------End Function Ads----------------------
%>
<%'-------------'Function Categories image upload for
Admin-----------------
Sub Categories
%>
<div align="center">
<table width="80%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td>
<div align="center">
<h3><font face="Verdana, Arial, Helvetica, sans-serif">Upload
Category Image</font></h3>
</div>
</td>
</tr>
<tr>
<td>
<div align="center">
<form name="form2" method="POST" enctype="multipart/form-data"
action="upload.asp?Upload=true&action=Categories&n CategoryID=<%=Request("nCategoryID")%>">
<table width="80%" border="0" cellspacing="0"
cellpadding="2">
<tr>
<td>Upload</td>
<td>
<input type="file" name="file1" size="20">
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="hidden" name="nCategoryId"
value="<%Request("nCategoryID")%>">
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="submit" name="Submit" value="Submit">
</td>
</tr>
</table>
</form>
</div>
</td>
</tr>
</table>
<%
strCategoryId = "cat" & request("nCategoryID")
strnCategoryId = request("nCategoryID")
if request("upload") = "true" Then

Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.SetMaxSize 20000, False
Upload.Save strAbsUploadPath

bolViolators = False
For Each File in Upload.Files
If File.ImageType <> "GIF" and File.ImageType <> "JPG" Then
bolViolators = True
Exit For
End If

If File.ImageWidth > 250 Then
bolViolators = True
Exit For
End If

If File.ImageHeight > 250 Then
bolViolators = True
Exit For
End If

If File.ImageType = "GIF" Then
strFileExtension = ".gif"
else
strFileExtension = ".jpg"
End If
Next

Set File = Upload.Files("FILE1")
SaveFileName = strAbsCatUploadPath & strCategoryId & strFileExtension
File.Copy
"d:\webspace\resadmin\bogazicikonut\bogazicikonut. com.tr\wwwroot\classifieds\uploads\"
& File.FileName
File.Delete

Set Upload = Nothing

If Not bolViolators then
Response.Write "Upload Successful..."
strSaveFileName = strCatUploadFolder & strCategoryId &
strFileExtension
%>
<p><img src="<%=strsaveFileName%>" border="1" ><br>
<font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Uploaded image<br>
<%=strsaveFileName%><br>
<br>
To change, browse and resubmit the form above <br>
Refresh the page to see new image<br>
</font> </p>
<p><font face="Geneva, Arial, Helvetica, san-serif" size="2"><a
href="admincom.asp?View=Categories&Action=UPLOAD&n CategoryID=<%=strnCategoryID%>&CategoryImage=<%=st rSaveFileName%>"><font
color="#008000">Continue</font></a></font><br>
</p>
<%

Else %>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Sorry,
there was an error<br>
The image is not a .GIF or a .JPG file or file is too big<br>
Try again<br>
</font> </p>

<%
End If
End If
%>
</Div>
<p>&nbsp;</p>
</body>
</html>

<%
End Sub
'---------------------------------------End Categories images
upload-------------------
%>

Feb 15 '06 #1
0 4634

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
2
by: Sean Dotson | last post by:
I have a form that passes variables to an asp file and then uploads a file. For some reason the request.form is not getting the info from the form. It's returning blanks. Any insight would be...
3
by: news.rcn.com | last post by:
How can I access the request and response object for a page using javascript. I want to stick some data on with something like request.setAttribute( "User's choice for later use" ). I can't seem...
4
by: Alberto | last post by:
Could you tell me what it's for the "Persist Security Info ..." value in a connection string. Thank you.
2
by: BH | last post by:
I developed a small web app using the FormsAuthentication class to set a cookie (FormsAuthentication.SetAuthCookie(value, isPersist)). The cookie persists fine on my local PC when "isPersist" is...
1
by: Paul Perot | last post by:
Hi All: I have a DataTable that I have defined Globally. I populate this datatable dynamically with file/folder information that I read directly from the server. I use this datatable...
4
by: Grey | last post by:
how can I persist the data input in the textbox which the Textmode = Password after postback?? I found that when I set the Textmode in textbox to PASSWORD, i cannot persist the data within the...
3
by: Dave Adler | last post by:
Is there any way to retain the value of an HtmlInputFile control through a postback? I do some server side validation on the page when it is submitted and if an error occurs on the page the...
5
by: senol | last post by:
UPLOAD bu class public static void ResimYükle(HtmlInputFile HtmlInput, string id,string Klasor,string KatID) { string path_file;
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.