<% Option Explicit 'Stores only files with size less than MaxFileSize Dim DestinationPath DestinationPath = Server.mapPath("Uploads") 'Create upload form 'Using Huge-ASP file upload 'Dim Form: Set Form = Server.CreateObject("ScriptUtils.ASPForm") 'Using Pure-ASP file upload Dim Form: Set Form = New ASPForm %> <% Server.ScriptTimeout = 2000 Form.SizeLimit = &HA00000 If Form.State = 0 Then 'Completted Dim File, DestFileName For Each File In Form.Files.Items If Len(File.FileName) > 0 Then DestFileName = GetUniqueFileName(File.FileName, DestinationPath) File.SaveAs DestinationPath & "\" & DestFileName End If Next ElseIf Form.State > 10 then Const fsSizeLimit = &HD Select case Form.State case fsSizeLimit: response.write "
Source form size (" & Form.TotalBytes & "B) exceeds form limit (" & Form.SizeLimit & "B)
" case else response.write "
Some form error.
" end Select End If'Form.State = 0 then Dim gFS Function GetUniqueFileName(FileName, DestPath) if isempty(gFS) then Set gFS = CreateObject("Scripting.FileSystemObject") Dim Counter, FullPath, NewFileName Counter = 1 NewFileName = FileName if gFS.FileExists(DestPath & "\" & NewFileName) then Do Counter = Counter + 1 NewFileName = Counter & "-" & FileName Loop while gFS.FileExists(DestPath & "\" & NewFileName) end if GetUniqueFileName = NewFileName End Function %> The Best Talents

.
          Tip 4 Job-Seekers

The more NOs you get out of the way it means you are getting closer to a YES!
Get up and start getting more
NOs out of the way.

                    Select

               What's New

    Join us
as an
Affiliate

THE BEST TALENTS.COM :: SITE MAP

In case you have any query or want some further information, please E-mail us at:  info@thebesttalents.com

Feedback || Sitemap || Terms & Conditions || Disclaimer

Important: We do not guarantee anyone a job or interview as we are not the hiring organization/company.

.

© 2007 ::  SR-I-Business Consultants