From: Todd on
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


From: s_m_b on
=?Utf-8?B?VG9kZA==?= <Todd(a)discussions.microsoft.com> wrote in
news:B898E3C7-641D-4072-B9D0-42D5004E6B3A(a)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
>
>
>