Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
sorenmt84  
#1 Posted : Tuesday, February 8, 2011 2:40:32 AM(UTC)
sorenmt84

Rank: Newbie

Groups: Member
Joined: 1/21/2010(UTC)
Posts: 7

I juse Aurigma imageuploder v. 7 and classic asp - in the top of my upload script, I use fso to create folders for the uploades images - but it don't work.

I now the fso script is okay, because if i run it on a seperate page the folders are created and no error - When I juse it with Aurigma, the folderes are still created, but the images isen't uploaded and I get the red error bar on in the uploader that says somthing lige contact webmaster.

I have jused this script with version 6 of aurigma, and there its works perfect... Can someone help me?

Regards

Code:
<%@ Language="VBScript" %>

<% Server.ScriptTimeout = 450

mappenavn = date() & "-" & hour(now) & "-" & minute(now) & "-" & second(now)
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateFolder("C:\inetpub\wwwroot\billeder.sejsspejderne.dk\billeder\" & mappenavn & "")
set f=nothing
set fs=nothing 
' opret prev mappe
set fp=Server.CreateObject("Scripting.FileSystemObject")
set c=fp.CreateFolder("C:\inetpub\wwwroot\billeder.sejsspejderne.dk\billeder\" & mappenavn & "\prevs")
set c=nothing
set fp=nothing 
' opretter thumb mappe
set ft=Server.CreateObject("Scripting.FileSystemObject")
set a=ft.CreateFolder("C:\inetpub\wwwroot\billeder.sejsspejderne.dk\billeder\" & mappenavn & "\thumbs")
set a=nothing
set ft=nothing

Dim strGalleryPath
strGalleryPath = "../../../billeder/" & mappenavn & "/"


Sub ProcessABCUpload
	Dim objUpload
	Set objUpload = Server.CreateObject("ABCUpload4.XForm")
	
	objUpload.Overwrite = True
	
	objUpload.MaxUploadSize = 115343360
	objUpload.AbsolutePath = True

	Dim objFolder, objFile

	Dim intFileCount, i
	intFileCount = CInt(objUpload.Form("PackageFileCount")(1))

	For i = 0 To intFileCount - 1
		
		'Preview billede
		Dim objThumbnail1File
		Set objThumbnail1File = objUpload.Files("File0_" & i)
		Dim strFileName
		
		strFileName = objThumbnail1File.SafeFileName
		objThumbnail1File.Save Server.MapPath(strGalleryPath & "prevs/" & strFileName)
		
		'Thumbnail billede 
		Dim objThumbnail2File
		Set objThumbnail2File = objUpload.Files("File1_" & i)
		strFileName=objThumbnail2File.SafeFileName
		objThumbnail2File.Save Server.MapPath(strGalleryPath & "thumbs/" & strFileName)
		
	Next
		
End Sub


ProcessABCUpload %>

Edited by moderator Tuesday, February 8, 2011 3:11:38 AM(UTC)  | Reason: Not specified

Dmitry.Obukhov  
#2 Posted : Wednesday, February 9, 2011 5:19:19 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Søren,

Could you please provide me with stack trace of error which occurs?

Best regards,

Dmitry Obukhov

Technical Support. Aurigma, Inc.

sorenmt84  
#3 Posted : Sunday, February 13, 2011 12:55:12 PM(UTC)
sorenmt84

Rank: Newbie

Groups: Member
Joined: 1/21/2010(UTC)
Posts: 7

I insert a On Error resume Next in the top of the page, and now everything works fine
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.