Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - mySmartUpload: Error Invalid Files Name
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

mySmartUpload: Error Invalid Files Name

 Post Reply Post Reply
Author
Epon View Drop Down
Newbie
Newbie


Joined: 20 October 2003
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Epon Quote  Post ReplyReply Direct Link To This Post Topic: mySmartUpload: Error Invalid Files Name
    Posted: 20 October 2003 at 5:28am

Hi,

I am trying to use the mySmartUpload component to allow people to upload files into my server. However, I keep getting the error Invalid Files Name 'logopic' (Error 1205). Here is my code snippet:

In my first page I have a form with a file input type

<input type="file" name="logopic" size="65"> 

In my next page,

 On Error Resume Next

'  Variables
'  *********
   Dim mySmartUpload
   Dim intCount

'  Object creation
'  ***************
   Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

'  Only allow txt or htm files
'  ***************************
   mySmartUpload.AllowedFilesList = "jpg,gif,bmp,png"

'  Upload
'  ******
   mySmartUpload.Upload

   intCount = mySmartUpload.Save("/MP")

strLogoPic = mySmartUpload.Files("logopic").FileName

If Err Then
      Response.Write(Err.description)
End if

I then get the error message Invalid Files Name 'logopic' (Error 1205). I already checked that the name of my input object in the previous page is indeed 'logopic' but I still get this error.

Can anybody help me? I have been stuck at this for some time.

Thanks.

Epon

 

Back to Top
God_Struth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 August 2003
Location: United Kingdom
Status: Offline
Points: 218
Post Options Post Options   Thanks (0) Thanks(0)   Quote God_Struth Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2003 at 11:31am
Shouldn't this section:

' Only allow txt or htm files
' ***************************
   mySmartUpload.AllowedFilesList = "jpg,gif,bmp,png"




Look Like This:

' Only allow txt or htm files
' ***************************
   mySmartUpload.AllowedFilesList = ".jpg,.gif,.bmp,.png"

-----------------

Since its not recognising the extension, try that first.
"I'm only trying to help......"
Back to Top
Epon View Drop Down
Newbie
Newbie


Joined: 20 October 2003
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Epon Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2003 at 8:46pm

Hi,

Tried it. But didn't work. Anyway the

'  Only allow txt or htm files
'  ***************************
   mySmartUpload.AllowedFilesList = "jpg,gif,bmp,png"

is based on the sample code that was provided with the component when I downloaded it.

Any other suggestions or tips?

Thanks.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.