ASPUploader Resizing

Hi,

We have a file uploader for asp which works great.  However, I want to resize the images rather than just warning them that they've reached their limit, is this possible?

Code attached.

<form id="form1" method="POST">
				<%
					Dim uploader
					Set uploader = new AspUploader
					uploader.MaxSizeKB = 51200 'WAS 102400 - REDUCED IT BY HALF AS A TEST AS PER DOT 29/08/2013
					uploader.Name = "myuploader"
					uploader.SaveDirectory = Request.QueryString("Table") & "/" & Request.QueryString("SubID")
					uploader.AllowedFileExtensions = "*.jpg,*.png,*.gif,"
					uploader.InsertText = "Click to Select Files"
					uploader.MultipleFilesUpload = true
                %>
                <%=uploader.GetString() %>
			</form>
            
            <br/><br/>
            
			<%

				'Add filenames to database...
				
					'Reset filestore records...
						strSQL = "DELETE FROM [" & Request.QueryString("Table") & "] WHERE [SubID] = " & Request.QueryString("SubID") & ";"			
						objRS.Open strSQL, objConn
						
					'Now add back all records in folder...

						Set fso = CreateObject("Scripting.FileSystemObject")
						Set f = fso.GetFolder(appFileStore & Request.QueryString("Table") & "\" & Request.QueryString("SubID"))
						Set fc = f.Files
						For Each f1 in fc
							strFileName = Right(f1, Len(f1) - InstrRev(f1, "\"))
							If Len(Request.QueryString("Type")) > 0 Then
								strSQL = "INSERT INTO [" & Request.QueryString("Table") & "] ([File Name], [Description], [Type], [SubID], [Added By]) "
								strSQL = strSQL & "SELECT '" & strFileName & "', '" & strFileName & "','" & Request.QueryString("Type") & "', "
								strSQL = strSQL & Request.QueryString("SubID")  & ", '" & Session("UserName") & "';"
							Else
								strSQL = "INSERT INTO [" & Request.QueryString("Table") & "] ([File Name], [Description], [SubID], [Added By]) "
								strSQL = strSQL & "SELECT '" & strFileName & "', '" & strFileName & "', " & Request.QueryString("SubID")  & ", '"
								strSQL = strSQL & Session("UserName") & "';"
							End If
							objRS.Open strSQL, objConn
						Next
						Set fso = Nothing
						
			
				If Request.Form("myuploader")&""<>"" Then
				
					list = Split(Request.Form("myuploader"),"/")
				
					For i = 0 To Ubound(list)
					Next
					
				End If

Open in new window


Thanks
Tra71Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
If you want to resize, you need another program.  Persists also makes aspJpeg http://www.aspjpeg.com/  On my server I use http://www.imagemagick.org/.

Another option is you can create a little web service using php and have php do the resize.  

It would work something like
1) aspupload sends image to server stores image name and location to a cookie or database.

2) your own asp code calls the page in php and through a post or get.  The php will resize.

If you can do it all in asp, it would be easier.  Otherwise, you need to pay for another component or use imagemagick (open source) or php.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.