Pure ASP Upload 3 Support Product Page

Multiupload not entering into database

Reported 08 Mar 2012 23:47:22
4
have this problem
08 Mar 2012 23:47:22 Les Gossett posted:
I have a simple multi upload form set up using Pure ASP Upload 3.0.17 and it uploads the images as it should, but it is not inserting into my database. The page is at: www.techlandhouston.com/admin/uploadtest.aspI followed the instructions in the manual on how to set this up, but it is still not working. What am I missing? Thanks.

Here is the code with parts redacted for security:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="DB CONNECTION HERE" -->
<!--#include file="../ScriptLibrary/incPU3Class.asp" -->
<!--#include file="../ScriptLibrary/incPU3Utils.asp" -->
<
%'*** Pure ASP File Upload 3.0.17
' Process form upload1
Dim pau, DMX_uploadAction, UploadRequest, UploadQueryString, pau_thePath, pau_nameConflict, pau_saveWidth, pau_saveHeight
Set pau = new PureUpload
pau.ScriptLibrary = "../ScriptLibrary"
pau.TimeOut = 120
pau.ConflictHandling = "uniq"
pau.StoreType = "file"
pau.UploadFolder = """../images/products"""
pau.AllowedExtensions = "GIF,JPG,JPEG,BMP,PNG" ' "images"
pau.MaxFileSize = 1000
pau.ProcessUpload
pau.SaveAll
if pau.Done then 
  SetUploadFormRequest "Filedata",pau.Fields("Filedata").FileName
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_insert")) = "upload1") Then
  If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd

    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_techland_STRING
    MM_editCmd.CommandText = "INSERT INTO u1104771_techland.prodpics (prodpics_prodID, prodpics_piclink) VALUES (?, ?)" 
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 5, 1, -1, MM_IIF(UploadFormRequest("prodpics_prodID"), UploadFormRequest("prodpics_prodID"), null)) ' adDouble
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 201, 1, 400, UploadFormRequest("Filedata")) ' adLongVarChar
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
  End If
End If
%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</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" name="upload1">
  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="250" height="150" id="upload1" align="middle">
    <param name="FlashVars" value="<%=pau.FlashVars()%>" />
    <param name="movie" value="dmxPureUpload.swf" />
    <param name="quality" value="best" />
    <param name="scale" value="noscale" />
    <param name="wmode" value="transparent" />
    <embed src="dmxPureUpload.swf" id="upload1" quality="best" flashvars="<%=pau.FlashVars()%>" scale="noscale" wmode="transparent" type="application/x-shockwave-flash" width="250" height="150" pluginspage="http://www.macromedia.com/go/getflashplayer" />
  </object>
  <input type="hidden" name="prodpics_prodID" value="1" />
  <input name="Filedata" type="hidden" value="<%= pau.Fields("Filedata").FileName %>" />
  <input type="hidden" name="MM_insert" value="upload1">
</form>
</body>
</html>

Replies

Replied 12 Mar 2012 06:55:06
12 Mar 2012 06:55:06 Teodor Kuduschiev replied:
Hi Les,

Please make sure you are inserting the server behaiors the following order:
1. Advanced multi uploader
2. Smart image processor (if you want to use it)
3. The rest of the server behaviors
Replied 29 Jun 2012 22:08:02
29 Jun 2012 22:08:02 Jacque D replied:
is this problem has been solved yet because i am having the same problem
Replied 02 Jul 2012 06:37:36
02 Jul 2012 06:37:36 Teodor Kuduschiev replied:
Hello Jacque,

Please describe your problem a little more detailed.
Replied 14 Nov 2013 08:20:55
14 Nov 2013 08:20:55 None Nothing replied:
I'm having the same issue.

Any ideas?

Reply to this topic