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 : Sunday, February 6, 2011 4:53:02 AM(UTC)
sorenmt84

Rank: Newbie

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

I am new in juse of version 7 upload - but have made a upload script (in classic asp - from the exsamples there can be fund in the forum) - I juse ABCUpload4 to upload and i works fine -

I upload two thumbnails of the file - a preview and a thumnail

Code:
		uploader.converters([
			{
				mode: '*.*=Thumbnail',
				thumbnailFitMode: '<% =fitMode %>',
				thumbnailWidth: '<% =maxWidth %>',
				thumbnailHeight: '<% =maxHeight %>',
				thumbnailJpegQuality: '<% =quality %>',
				thumbnailCopyExif: false
			}
		]);
		
		//Configure thumbnail settings.
			uploader.converters().add({
				mode: '*.*=Thumbnail',
				thumbnailFitMode: '<% =fitMode %>',
				thumbnailWidth: '<% =maxThumbWidth %>',
				thumbnailHeight: '<% =maxThumbHeight %>',
				thumbnailJpegQuality: '<% =qualityThumb %>'
			});


When i get uploaded, the script but the large file in a folder "prevs" and the small one in the folder "thumbs" - i works also fine

Code:
	strFileName = objThumbnail1File.SafeFileName
		objThumbnail1File.Save Server.MapPath(strGalleryPath & "prevs/" & strFileName)
		
		lngTotalUploadedFileSize = lngTotalUploadedFileSize + _
			objFileSystem.GetFile(Server.MapPath(strGalleryPath & "prevs/" & strFileName)).Size
		
		if session("saveThumbNail") then	
			'Get the second thumbnail and save it to disk. It stores 120x120 preview image. 
			Dim objThumbnail2File
			Set objThumbnail2File = objUpload.Files("File1_" & i)
			strFileName=objThumbnail2File.SafeFileName
			objThumbnail2File.Save Server.MapPath(strGalleryPath & "thumbs/" & strFileName)
		end if


But all my images get a new filename when they are uploaded - the orignial filename and then thumbnail 0 or 1 after like: img_0443.jpg becomes img_0443_thumnail0.jpg for the large preview and img_0443_thumbnail1.jpg for the small thumbnail

I can find a place in the script where the filename is controlled - but is there somehow I can change this? so fx i can insert a timecode or just _prev and _thums after the origninal filname

Regrads
Søren
Denmark

Edited by moderator Sunday, February 6, 2011 6:16:59 AM(UTC)  | Reason: Not specified

Dmitry.Obukhov  
#2 Posted : Monday, February 7, 2011 3:32:53 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,

Thank you for contacting us.

You need to use SourceName field. Here is the code snippet how to save thumbnails with source name and prefix:
Code:

…
objThumbnail1File.Save Server.MapPath(strGalleryPath &  "prev_" & objUpload.Form("SourceName_" & i)(1))
…
objThumbnail2File.Save Server.MapPath(strGalleryPath & "thumb_" & objUpload.Form("SourceName_" & i)(1))

If you have any additional questions, please feel free to let me know.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
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.