mysmartupload issue

T

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
 
S

s_m_b

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top