Hej, kan inte få detta att fungera. Ngn som har erfarenhet av JUpload ( JUpload.biz ) multiupload.Ngn som kan hjälpa mig med denna UPLOAD ???
Här kommer koden:
Saxat ur deras support forum, som tyvärr tar för lång tid för hjälp.
Annars ngn annan kan hjälpa mig med ett multiupload kodning?
Configurationhelp with existing uploadfile. Asp
Hi,
Great concept, and easy to use and implement - thanks!
But I really need some help and are very grateful for every tip. I´m trying to just implement the applet and use my existing upload file, but cant get it done. ASP, MS Access database and IIS.
Please take a look at the code below.
The page that opens the applet:
<form name="JUploadForm">
<input type="text" name="belongsToGalleryID" value="<%=RS("galleryID")%>">
<input type="text" name="belongsToCatID" value="<%=RS("belongsTogalleryCatID")%>">
<input type="text" name="belongsToUCatID" value="<%=RS("belongsToUnderCatID")%>">
<input type="text" name="belongsToMemberID" value="<%=imemberID%>">
<applet code="JUpload.startup" archive="http://racefoto.servehttp.com/jupload.jar" width="600" height="400" mayscript name="JUpload" alt="JUpload by www.jupload.biz">
<param name="progressbar" value="true">
<param name="boxmessage" value="Starting Upload Client...">
<param name="boxbgcolor" value="#DDDDDD">
<param name="image" value="">
<param name="sendLastModificationDate" value="false">
<param name="skipNewlineAfterHeader" value="true">
<param name="actionURL" value="upload.asp">
<param name="debug" value="true">
<param name="showFilePaths" value="true">
</applet>
</form>
And then the uploadfile. I´m using some components for uploading and rezise the images. Also putting some values to the database for each image here.
' Calls the component
Set theForm = Server.CreateObject("ABCUpload4.XForm")
theForm.MaxUploadSize = "100.000.000"
theForm.AbsolutePath = True
Set theField = theForm.Files("JUploadForm") ' I really dont know what I should put in here!!
If theField.FileExists Then
' Save the file
theField.Save ( Request.ServerVariables("APPL_PHYSICAL_PATH") & "uploaded_files\" & theField.SafeFileName)
' #### Create thumbnails
' Setting paths and filenames
inpath = Request.ServerVariables("APPL_PHYSICAL_PATH") & "uploaded_files\" &theField.SafeFileName
' Big pic
outpath1 = Request.ServerVariables("APPL_PHYSICAL_PATH") & "uploaded_files\" &"big_"& theField.SafeFileName
' Thumb
outpath2 = Request.ServerVariables("APPL_PHYSICAL_PATH") & "uploaded_files\" &"thumb"& theField.SafeFileName
' Calling Imageglue component for rezising
Set canvas1 = Server.CreateObject("ImageGlue5.Canvas")
Set canvas2 = Server.CreateObject("ImageGlue5.Canvas")
Set graph = Server.CreateObject("ImageGlue5.Graphic")
Set rect = Server.CreateObject("ImageGlue5.XRect")
' Finding size of uploaded image
graph.SetFile inpath
rect.String = graph(1).Rectangle
' Creating big pic
canvas1.Width = 370
canvas1.Height = (370 * rect.Height) / rect.Width
canvas1.DrawFile inpath, "size=" & canvas1.Width & "," & canvas1.Height
canvas1.SaveAs outpath1, "Quality=high"
' Creating thumbnail
canvas2.Width = 130
canvas2.Height = (130 * rect.Height) / rect.Width
canvas2.DrawCanvas canvas1.Image, "size=" & canvas2.Width & "," & canvas2.Height
canvas1.Clear
canvas2.SaveAs outpath2, ""
Else
' No image loaded
Response.write "No image loaded"
End if
' Writing some stuff to the database
strSQL = "SELECT * FROM tbl_privateGalleryImages WHERE 1=2"
RS.Open strSQL, conn, 1, 2
RS.AddNew
RS("belongsToGalleryID")= theForm.Form("belongsToGalleryID")
RS("belongsToCatID") = theForm.Form("belongsToCatID")
RS("belongsToUCatID") = theForm.Form("belongsToUCatID")
RS("belongsToMemberID" = theForm.Form("belongsToMemberID")
RS("originalFile") = theField.SafeFileName
RS("bigFile") = "big_"& theField.SafeFileName
RS("thumbFile") = "thumb"& theField.SafeFileName
RS.UpDate