Avatar of Tra71
Tra71 asked on

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
ASPWeb Languages and Standards

Avatar of undefined
Last Comment
Scott Fell

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Scott Fell

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes