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

Notification

Icon
Error

Options
Go to last post Go to first unread
CharlieK  
#1 Posted : Thursday, August 23, 2007 9:34:35 AM(UTC)
CharlieK

Rank: Member

Groups: Member
Joined: 8/23/2007(UTC)
Posts: 4

I am running Image Uploader 3.5 and want to upload just a thumbnail/resized image and use the original filename. I have sample code that breaks when the "UploadSourceFile" VALUE="0"

Code:
For I = 1 To intFileCount
            ''Get source image and save it to disk
            SourceFile = Request.Files("SourceFile_" & I)
            Dim strFileName As String = Path.GetFileName(SourceFile.FileName)

Thank you.

Edited by user Monday, December 17, 2007 12:24:56 PM(UTC)  | Reason: Not specified

Charlie
George Ulyanov  
#2 Posted : Thursday, August 23, 2007 12:26:55 PM(UTC)
George Ulyanov

Rank: Advanced Member

Groups:
Joined: 7/26/2006(UTC)
Posts: 203

Hello,

You should set UploadSourceFile property to true.

Edited by user Sunday, February 24, 2008 6:55:06 PM(UTC)  | Reason: Not specified

Best regards,
George Ulyanov
CharlieK  
#3 Posted : Friday, August 24, 2007 12:54:17 AM(UTC)
CharlieK

Rank: Member

Groups: Member
Joined: 8/23/2007(UTC)
Posts: 4

If I set "UploadSourceFile" property to "true" doesn't that defeat the purpose of limiting the upload to only the small thumbnail to save processing time? Wouldn't that upload potentially large image files?
Charlie
Eugene Kosmin  
#4 Posted : Monday, August 27, 2007 9:26:23 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 438

Was thanked: 22 time(s) in 22 post(s)
Hello Charlie,

Try to use this:
Code:
…
SourceFile = Request.Files("Thumbnail1_" & I)
…

Edited by user Monday, February 25, 2008 4:19:52 PM(UTC)  | Reason: Not specified

Best regards,
Eugene Kosmin.
Aurigma Development Team
CharlieK  
#5 Posted : Tuesday, October 9, 2007 9:50:57 PM(UTC)
CharlieK

Rank: Member

Groups: Member
Joined: 8/23/2007(UTC)
Posts: 4

Eugene,

Thank you for the suggestion, but I need the original file name, the code you provided would create a name of "Thumbnail1_". Unless I am missing something?

Thank you,

Edited by user Monday, February 25, 2008 4:20:13 PM(UTC)  | Reason: Not specified

Charlie
Gavp  
#6 Posted : Tuesday, October 9, 2007 10:08:20 PM(UTC)
Gavp

Rank: Member

Groups: Member
Joined: 10/4/2007(UTC)
Posts: 6

Hi,

I had a similar problem but I found the filename here in the FileName parameter, so my code is something like this:

Code:
my $filecount = param("FileCount");
for (my $i = 1; $i <= $filecount; $i++){
    my $filename = param("FileName_" . $i);
}


I hope that helps.
Gav

Edited by user Monday, February 11, 2008 5:26:52 PM(UTC)  | Reason: Not specified

Users browsing this topic
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.