mysmartupload issue
am 18.12.2007 20:00:00 von Todd
hello
I'm trying to rename the aspsmartupload filename but having issues.
Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
mySmartUpload.Upload
set mySmartUpload.Files.Item(1).FileName = mySmartUpload.Form("year") &
mySmartUpload.Files.Item(1).FileName
this is the error I get
Microsoft VBScript runtime error '800a01a8'
Object required: 'FileName'
the filename will write to the screen with no problems, as well, I tried
assigning a simple string to the filename but with no success.
Can you even change mysmartupload data? I hoped you could.
any insight would be most appreciated
Thank You
Re: mysmartupload issue
am 20.12.2007 10:42:20 von s_m_b
=?Utf-8?B?VG9kZA==?= wrote in
news:B898E3C7-641D-4072-B9D0-42D5004E6B3A@microsoft.com:
I use this to process files.
Set fileUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
........
fileUpload.Upload
........
For each fileUploaded In fileUpload.Files
..........
strfilename = trim(fileUpload.Files.item(1).filename)
..........
strfileFullname = fileUploaded.name
..........
fileUploaded.Saveas (strPubHoldingFolder & "\" & strFileName)
..........
next
........
This allows you to alter the name of the uploaded file if you want.
Its just a snippet from a much more involved loop (hence the ......) so
I've not dim'ed and there is no error trapping!
Its worth pointing out that this component has long since been
discontinued.
> hello
>
> I'm trying to rename the aspsmartupload filename but having issues.
>
> Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
> mySmartUpload.Upload
> set mySmartUpload.Files.Item(1).FileName = mySmartUpload.Form("year") &
> mySmartUpload.Files.Item(1).FileName
>
>
>
> this is the error I get
>
> Microsoft VBScript runtime error '800a01a8'
>
> Object required: 'FileName'
>
> the filename will write to the screen with no problems, as well, I tried
> assigning a simple string to the filename but with no success.
>
> Can you even change mysmartupload data? I hoped you could.
>
> any insight would be most appreciated
>
> Thank You
>
>
>