473,383 Members | 1,874 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 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 4729

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;
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.