Link to home
Start Free TrialLog in
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
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial