Forums
This topic is locked
Uploaded Files
12 Dec 2009 02:52:14 Jacque D posted:
I did get this extension couple weeks ago, and i am having a serious issues with it. it's not an easy to use as described.I had to spend hours trough your forum and searching the web
to find fixes which some of them i did fix on my own. but i am still having problems. that need to be fixed.
- No consistency when uploading images some time works, and some other time it give me
"File: /ScriptLibrary/incSIP2Class.asp
Line: 1710
Description: The system cannot find the file specified.".
- Time to time it times out.
- when uploading / updating images 1,2,3,4 the original image of 3 or 4 doesn't get uploaded, it loads small or smaller but not original images of 3, and 4. the image name get inserted in the database field, but no image in the folder.
- when delete before upload, it will upload another image with different name.
it doesn't delete the image and rename it as the original.
i am attaching my code. so you can take a look at. Please i need help with this because i am over my dead line.
I am using asp, windows as server. all permission and server has been set.
Script:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include virtual="/ScriptLibrary/incSIP2Class.asp" -->
<!--#include virtual="/Connections/connect.asp" -->
<!--#include virtual="/ScriptLibrary/incPU3Class.asp" -->
<!--#include virtual="/ScriptLibrary/incPU3Utils.asp" -->
<!--#include virtual="/ScriptLibrary/incPUAddOn.asp" -->
<
%Dim rsAds
Dim rsAds_cmd
Dim rsAds_numRows
Set rsAds_cmd = Server.CreateObject ("ADODB.Command")
rsAds_cmd.ActiveConnection = MM_connect_STRING
rsAds_cmd.CommandText = "SELECT ID .........."
rsAds_cmd.Prepared = true
rsAds_cmd.Parameters.Append rsAds_cmd.CreateParameter("param1", 5, 1, -1, rsAds__MMColParam) ' adDouble
rsAds_cmd.Parameters.Append rsAds_cmd.CreateParameter("param2", 200, 1, 255, rsAds__MMColParame) ' adVarChar
Set rsAds = rsAds_cmd.Execute
rsAds_numRows = 0
%>
<
%'*** Pure ASP File Upload 3.0.15
' Process form uploadimages
Dim pau, DMX_uploadAction, UploadRequest, UploadQueryString, pau_thePath, pau_nameConflict, pau_saveWidth, pau_saveHeight
Set pau = new PureUpload
pau.ScriptLibrary = "/ScriptLibrary"
pau.ConflictHandling = "uniq"
pau.TimeOut = 6000
pau.StoreType = "file"
pau.ProgressTemplate = "speedometer.htm"
pau.ProgressWidth = 400
pau.ProgressHeight = 200
pau.UploadFolder = """uploads"""
pau.AllowedExtensions = "GIF,JPG,JPEG,BMP,PNG" ' "images"
pau.ProcessUpload
pau.SaveAll
%>
<
%' *** Rename Uploaded Files 1.8.1
If (CStr(Request.QueryString("GP_upload")) <> "") Then
Dim REUF_renameMask
REUF_renameMask = rsAds.Fields.Item("ID").Value & ".jpg"
'UploadFormRequest("ID") & ".jpg"
RenameUploadedFiles pau_thePath, pau_nameConflict, REUF_renameMask
end if
%>
<
%' Smart Image Processor 2.5.4
Dim sip1
Set sip1 = New ImageProcessor
sip1.Key = "84ECD07E-4D94-4E68-91AD-CF11E868F4ED"
sip1.ScriptFolder = "../ScriptLibrary"
sip1.Component = "Auto"
sip1.Source = "upload"
sip1.AutoOrient = false
sip1.KeepMetaData = false
sip1.Matte = "#000000"
sip1.UploadFields = ""
sip1.GetFiles
While sip1.HasFiles
sip1.LoadFromSource
sip1.Resize 550, 400, true
sip1.Sharpen
sip1.FontFamily = "Arial"
sip1.FontSize = 14
sip1.FontColor = "#FFFFFF"
sip1.Bold = true
sip1.Italic = false
sip1.Underline = false
sip1.AddText "Copy right Text","Center-Center"
sip1.Overwrite = true
sip1.SaveJPEG 80
sip1.MoveNext
Wend
Set sip1 = Nothing
%>
<
%' Smart Image Processor 2.0.3
Dim sip2
Set sip2 = New ImageProcessor
sip2.Key = "508E670B-83EC-446A-86B0-4166D5F87F5E"
sip2.ScriptFolder = "../ScriptLibrary"
sip2.Component = "Auto"
sip2.Source = "upload"
sip2.UploadFields = ""
sip2.GetFiles
While sip2.HasFiles
sip2.LoadFromSource
sip2.Resize 164, 114, true
sip2.Overwrite = false
sip2.Mask = "##path####name##_small.jpg"
sip2.SaveJPEG 80
sip2.MoveNext
Wend
Set sip2 = Nothing
%>
<
%' Smart Image Processor 2.0.3
Dim sip3
Set sip3 = New ImageProcessor
sip3.Key = "508E670B-83EC-446A-86B0-4166D5F87F5E"
sip3.ScriptFolder = "../ScriptLibrary"
sip3.Component = "Auto"
sip3.Source = "upload"
sip3.UploadFields = ""
sip3.GetFiles
While sip3.HasFiles
sip3.LoadFromSource
sip3.Resize 100, 75, true
sip3.Overwrite = false
sip3.Mask = "##path####name##_smaller.jpg"
sip3.SaveJPEG 80
sip3.MoveNext
Wend
Set sip3 = Nothing
%>
<
%' *** Delete Old Files Before Update Record 1.8.1
If (CStr(UploadFormRequest("MM_update")) <> "" And CStr(UploadFormRequest("MM_recordId")) <> "") Then
Dim DOF_suffix
DOF_suffix = ""
DeleteFileBeforeUpdate pau_thePath,"imagea||imageb||imagec||imaged|","imagea||imageb||imagec||imaged|",MM_classifieds_STRING,"dbo.ADS","ID",UploadFormRequest("MM_recordId"),DOF_suffix
end if
%>
<
%Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (UploadQueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(UploadQueryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<
%' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<
%If (CStr(UploadFormRequest("MM_update")) = "uploadimages") Then
If (Not MM_abortEdit) Then
' execute the update
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_classifieds_STRING
MM_editCmd.CommandText = "UPDATE dbo.ADS SET imagea = ?, imageb = ?, imagec = ?, imaged = ?, ad_approved =? WHERE ID = ?"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 40, MM_IIF(UploadFormRequest("imagea"), UploadFormRequest("imagea"), UploadFormRequest("upload_org_imagea"))) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 40, MM_IIF(UploadFormRequest("imageb"), UploadFormRequest("imageb"), UploadFormRequest("upload_org_imageb"))) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 40, MM_IIF(UploadFormRequest("imagec"), UploadFormRequest("imagec"), UploadFormRequest("upload_org_imagec"))) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 40, MM_IIF(UploadFormRequest("imaged"), UploadFormRequest("imaged"), UploadFormRequest("upload_org_imaged"))) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 5, 1, -1, MM_IIF(UploadFormRequest("ad_approved"), UploadFormRequest("ad_approved"), null)) ' adDouble
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 5, 1, -1, MM_IIF(UploadFormRequest("MM_recordId"), UploadFormRequest("MM_recordId"), null)) ' adDouble
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "uploads_again.asp"
If (UploadQueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & UploadQueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & UploadQueryString
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>uploadimages</title>
<script type="text/javascript"><%=pau.generateScriptCode()%></script>
<script src="/ScriptLibrary/incPU3.js" type="text/javascript"></script>
</head>
<body>
<form action="<%=MM_editAction%>" method="post" enctype="multipart/form-data" name="uploadimages" id="uploadimages" onsubmit="<%=pau.submitCode()%>;return document.MM_returnValue" >
<div align="center">
<!--#include virtual="/scriptincludes/imagesincludes_detailchange.asp" -->
<div class="detailleft"><span class="blou-gras"></span></div>
<table width="550" align="center">
<tr valign="middle">
<td width="246" align="right" nowrap="nowrap"><div align="center"><strong>Photo 1</strong><strong>:</strong></div></td>
<td width="292"><input name="imagea" type="file" onchange="<%=pau.validateCode()%>;return document.MM_returnValue" value="<%=(rsAds.Fields.Item("imagea").Value)%>" /></td>
</tr>
<tr valign="middle">
<td align="right" nowrap="nowrap"><div align="center"><strong>Photo
2</strong><strong>:</strong></div></td>
<td><input name="imageb" type="file" onchange="<%=pau.validateCode()%>;return document.MM_returnValue" value="<%=(rsAds.Fields.Item("imageb").Value)%>" /></td>
</tr>
<tr valign="middle">
<td align="right" nowrap="nowrap"><div align="center"><strong>Photo
3</strong><strong>:</strong></div></td>
<td><input name="imagec" type="file" id="imagec" onchange="<%=pau.validateCode()%>;return document.MM_returnValue" value="<%=(rsAds.Fields.Item("imagec").Value)%>" /></td>
</tr>
<tr valign="middle">
<td align="right" nowrap="nowrap"><div align="center"><strong>Photo
4</strong><strong>:</strong></div></td>
<td width="292"><input name="imaged" type="file" id="imaged" onchange="<%=pau.validateCode()%>;return document.MM_returnValue" value="<%=(rsAds.Fields.Item("imaged").Value)%>" /></td>
</tr>
<tr valign="middle">
<td align="right" nowrap="nowrap"> </td>
<td width="292"><div align="center"><span class="footer">
<input type="submit" name="Submit" style="font-size: 8pt; font-family:
Verdana; color: #FFFFFF; font-weight: bold; background-color: #08086C" />
</span></div>
<hr width="100%" size="1" color="#ff6600" noshade="noshade" />
<div align="center"> <span class="footer"> </span></div></td>
</tr>
</table>
<br />
</div>
<input type="hidden" name="MM_update" value="uploadimages" />
<input type="hidden" name="MM_recordId" value="<%= rsAds.Fields.Item("ID").Value %>" />
<input type="hidden" name="upload_org_imagea" value="<%=(rsAds.Fields.Item("imagea").Value)%>" />
<input type="hidden" name="upload_org_imageb" value="<%=(rsAds.Fields.Item("imageb").Value)%>" />
<input type="hidden" name="upload_org_imagec" value="<%=(rsAds.Fields.Item("imagec").Value)%>" />
<input type="hidden" name="upload_org_imaged" value="<%=(rsAds.Fields.Item("imaged").Value)%>" />
<input name="ad_approved" type="hidden" id="ad_approved" value="0" />
</form>
</body>
</html><% End If ' end Not rsAds.EOF Or NOT rsAds.BOF %>
<
%rsAds.Close()
Set rsAds = Nothing
%>Replies
Replied 12 Dec 2009 17:45:44
12 Dec 2009 17:45:44 Jacque D replied:
I need support. Any one
Replied 12 Dec 2009 21:02:50
12 Dec 2009 21:02:50 Patrick Julicher replied:
Hi Jacque,
For questions regarding DMXzone extensions, post these in the corresponding Support Forum. In your case this would be the Smart Image Processor 2. Please move your question to one of the forums. If you do, also post a link to your page containing the problem. Meanwhile I'll check the code.
Kind regards, Patrick
For questions regarding DMXzone extensions, post these in the corresponding Support Forum. In your case this would be the Smart Image Processor 2. Please move your question to one of the forums. If you do, also post a link to your page containing the problem. Meanwhile I'll check the code.
Kind regards, Patrick
Replied 12 Dec 2009 21:49:47
12 Dec 2009 21:49:47 Jacque D replied:
Not sure how to move the post. Do i create new one on that topic.
We are using a developement server can only be access by specific IP
Thank you
We are using a developement server can only be access by specific IP
Thank you
Edited by - Jacque Dominique on 12 Dec 2009 21:50:25
Replied 12 Dec 2009 23:52:08
12 Dec 2009 23:52:08 Patrick Julicher replied:
Hi Jacque,
Just copy the content of your initial post, create a new one in the correct forum and paste the content.
About your problem. In your code I see two different version numbers for SIP, 2.0.3 and 2.5.4. Start by removing all SIP code and add it again with the same version of the extension.
Kind regards, Patrick
Just copy the content of your initial post, create a new one in the correct forum and paste the content.
About your problem. In your code I see two different version numbers for SIP, 2.0.3 and 2.5.4. Start by removing all SIP code and add it again with the same version of the extension.
Kind regards, Patrick
