troubleshooting Question

ASPUploader Resizing

Avatar of Tra71
Tra71 asked on
Web Languages and StandardsASP
1 Comment1 Solution345 ViewsLast Modified:
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

Thanks
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros