Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old January 5th, 2005, 02:41 AM
bumblebee bumblebee is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Kolkata, India
Posts: 13 bumblebee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 31 m 4 sec
Reputation Power: 0
Send a message via Yahoo to bumblebee
Unhappy urgent: aspSmartUpload save/saveas not working

Hi,

I am using aspSmartUpload to upload images, but the files are not getting saved. No error is generated (I am not using On Error Resume Next). Can anybody tell me what the problem might be? It is a mixed form, and I can access all variables (even the file size and name is shown correctly). I tried their sample app, I have the same problem there. I need to get this to work really quickly. Any help will be greatly appreciated.

Thanks in advance

Reply With Quote
  #2  
Old January 7th, 2005, 12:57 PM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,966 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 13 h 1 m 28 sec
Reputation Power: 104
Are you sure that there is no file involved in the application that is using On Error Resume Next. Failing this, sounds like the files are being saved in a directory other than the one you are expecting
__________________
selwonk

If I've posted some code above, you might think it looks a bit simplistic. It might be. I'd rather people tried the next step themselves rather than getting a full solution on a plate. That way they learn more!

Reply With Quote
  #3  
Old January 7th, 2005, 02:05 PM
bumblebee bumblebee is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Kolkata, India
Posts: 13 bumblebee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 31 m 4 sec
Reputation Power: 0
Send a message via Yahoo to bumblebee
There is code that uses On Error Resume next, however, my upload & save file code is in a sub of its own (and does raise errors for things like, when a file with a disallowed extension is selected).

As for the files getting saved elsewhere - I did a response.write for the path I am saving it to, and it seems fine. I did check the wwwroot directory, nothing's getting saved there, I don't know where else it could get saved.

I am using PWS on Windows 98, could that have anything to do with it? (I think it should not )

Edit: I did a find on my machine, there is no file with the name I specified when using saveas.

Reply With Quote
  #4  
Old January 8th, 2005, 12:45 AM
skpshah skpshah is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 63 skpshah User rank is Private First Class (20 - 50 Reputation Level)skpshah User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 h 7 m 32 sec
Reputation Power: 5
hi,

Make sure you have give full permission to the directory where you are saving the image. from windows explorer -> right click on that directory and select properties -> from there give full permission on web sharing : share this folder

and then try if it gets saved.

Also try this way

if not mySmartUpload.Files.Item(1).IsMissing Then
mySmartUpload.Files.Item(1).SaveAs("/path/" & filename)
end if

in the above give appropriate path and filename

regards
skpshah

Reply With Quote
  #5  
Old January 8th, 2005, 01:38 PM
bumblebee bumblebee is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Kolkata, India
Posts: 13 bumblebee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 31 m 4 sec
Reputation Power: 0
Send a message via Yahoo to bumblebee
I tried both your suggestions, it's still not working!! I can't find anything wrong with the code (as mentioned, even their sample app is not working)

Could it be because the client and server are the same machine??

Reply With Quote
  #6  
Old January 9th, 2005, 06:45 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,966 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 13 h 1 m 28 sec
Reputation Power: 104
If you have any On Error Resume Next comment them out. You can upload from one PC to the same PC. It definately sounds like the error is being suppressed somewhere

Reply With Quote
  #7  
Old January 9th, 2005, 11:51 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,635 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 2 h 55 m 37 sec
Reputation Power: 1902
Lightbulb

my advice: dump the asp"smart"upload in the nearest dumpster and get Pure ASP Upload code somewhere - I also made the mistake of using that component in my early days, got into tons of problems, and ever since I use the Pure ASP Upload code all is working smooth.

Reply With Quote
  #8  
Old January 10th, 2005, 12:16 AM
skpshah skpshah is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 63 skpshah User rank is Private First Class (20 - 50 Reputation Level)skpshah User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 h 7 m 32 sec
Reputation Power: 5
send your code, then maybe I can see whats the problem.

regards
skpshah




Quote:
Originally Posted by bumblebee
I tried both your suggestions, it's still not working!! I can't find anything wrong with the code (as mentioned, even their sample app is not working)

Could it be because the client and server are the same machine??

Reply With Quote
  #9  
Old January 11th, 2005, 11:59 AM
bumblebee bumblebee is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Kolkata, India
Posts: 13 bumblebee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 31 m 4 sec
Reputation Power: 0
Send a message via Yahoo to bumblebee
Here's the code:

Function uploadFile(mySmartUpload,virtFilePath)
Dim intCount,file

virtFilePath = "pics/filename."

mySmartUpload.DenyPhysicalPath = False
mySmartUpload.AllowedFilesList = "gif,jpg,jpeg"
mySmartUpload.MaxFileSize = 500000
mySmartUpload.TotalMaxFileSize = mySmartUpload.MaxFileSize

mySmartUpload.Upload

virtFilePath = virtFilePath & mySmartUpload.Files.Item(1).FileExt

If mySmartUpload.Files.Item(1).IsMissing Then
Response.Write "File not specified"
Else
response.write "path: "&Server.MapPath(virtFilePath)&" ...totbytes="&mySmartUpload.Files.TotalBytes&" ...numfiles="&mySmartUpload.Files.Count
mySmartUpload.Files.Item(1).SaveAs(Server.MapPath( virtFilePath))
End If
If Err.Number <> 0 Then handleError "photo upload error - "&Err.description, 1

uploadFile = virtFilePath
End Function 'uploadFile

Reply With Quote
  #10  
Old January 11th, 2005, 12:02 PM
bumblebee bumblebee is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Kolkata, India
Posts: 13 bumblebee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 31 m 4 sec
Reputation Power: 0
Send a message via Yahoo to bumblebee
Thanks for the tip, I'll have a look at that

Quote:
Originally Posted by Shadow Wizard
my advice: dump the asp"smart"upload in the nearest dumpster and get Pure ASP Upload code somewhere - I also made the mistake of using that component in my early days, got into tons of problems, and ever since I use the Pure ASP Upload code all is working smooth.

Reply With Quote
  #11  
Old January 11th, 2005, 12:07 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,635 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 2 h 55 m 37 sec
Reputation Power: 1902
try this instead of the last line:
If Err.Number <> 0 Then
Response.Write("error occured: "&Err.description&"<br />")
End If
maybe there is no such function as handleError.

Reply With Quote
  #12  
Old January 11th, 2005, 12:45 PM
bumblebee bumblebee is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Kolkata, India
Posts: 13 bumblebee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 31 m 4 sec
Reputation Power: 0
Send a message via Yahoo to bumblebee
Oh, sorry, that's my own error handling function. It simply redirects to my error page,which is not happening, so I know no error is raised.

Quote:
Originally Posted by Shadow Wizard
try this instead of the last line:
If Err.Number <> 0 Then
Response.Write("error occured: "&Err.description&"<br />")
End If
maybe there is no such function as handleError.

Reply With Quote
  #13  
Old January 11th, 2005, 04:47 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,635 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 2 h 55 m 37 sec
Reputation Power: 1902
so we're back in stage #1. as far as I know, that component you have is toally useless and simply does not work - my suggestion of using pure ASP upload stay my best advise then.

Reply With Quote
  #14  
Old January 12th, 2005, 01:49 PM
bumblebee bumblebee is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Kolkata, India
Posts: 13 bumblebee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 31 m 4 sec
Reputation Power: 0
Send a message via Yahoo to bumblebee
Quote:
Originally Posted by Shadow Wizard
so we're back in stage #1. as far as I know, that component you have is toally useless and simply does not work - my suggestion of using pure ASP upload stay my best advise then.

Hi, I took your advice, and it's finally uploading!! Thanks

Reply With Quote
Reply