469,331 Members | 1,785 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,331 developers. It's quick & easy.

mysmartupload issue

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
Dec 18 '07 #1
1 4244
=?Utf-8?B?VG9kZA==?= <To**@discussions.microsoft.comwrote in
news:B8**********************************@microsof t.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
Dec 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by George Hester | last post: by
2 posts views Thread by Anthony Cuttitta Jr. | last post: by
reply views Thread by Kevin Spencer | last post: by
reply views Thread by Charles Leonard | last post: by
2 posts views Thread by =?Utf-8?B?QnJvc3N5Zw==?= | last post: by
13 posts views Thread by SAL | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.