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



Go to last post Go to first unread
#1 Posted : Sunday, February 6, 2011 4:53:02 AM(UTC)

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

				mode: '*.*=Thumbnail',
				thumbnailFitMode: '<% =fitMode %>',
				thumbnailWidth: '<% =maxWidth %>',
				thumbnailHeight: '<% =maxHeight %>',
				thumbnailJpegQuality: '<% =quality %>',
				thumbnailCopyExif: false
		//Configure thumbnail settings.
				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

	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)
			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




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

#2 Posted : Monday, February 7, 2011 3:32:53 AM(UTC)

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:


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.