• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1835
  • Last Modified:

ASPSmartUpload is driving me CRAZY!

Hello all.  I'm new to ASP programming and have been dealing with this for 2 weeks and need some help.  I need to create a back-end user interface for a client to add articles and images AND/OR articles and MP3s to his site.  Our hosting company supposedly has ASPSmartUpload installed (at least they say they do!).  I have struggled for 2 weeks to try to use it to no avail.  I know you are going to point me to their documentation at www.aspsmart.com --believe me, I've been there hundreds to times trying to figure this thing out and cannot.  Is there a "step-by-step" tutorial or guide out there to use ASPSmartUpload?  I know the problem is on my end, but I need help badly!

Sincerely,
Adam
0
elevatedmarketing
Asked:
elevatedmarketing
  • 39
  • 36
  • 7
1 Solution
 
fritz_the_blankCommented:
0
 
elevatedmarketingAuthor Commented:
I've tried it, I get an HTTP 500 Server Error.
0
 
fritz_the_blankCommented:
Okay good!

Please try doing this:

In IE:

Tools Menu --> Internet Options -->Advanced Tab-->Show Friendly HTTP Error Messages

The last item should be unchecked.

Try that and then re run your page.

FtB
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
elevatedmarketingAuthor Commented:
THis is what I get back...


aspSmartUpload.File error '80040460'

Unable to save file (Error 1120)

/asp/upload.asp, line 31


Here is Line 31:    

file.SaveAs(filename)

By the way, I already feel like we're getting somewhere...
0
 
fritz_the_blankCommented:
That's good!

Would you please post the whole page of code so that I can take a look? Also, are you certain that you set the form type to multipart/form-data like this:

<FORM METHOD="POST" ACTION="upload.asp" ENCTYPE="multipart/form-data">

0
 
elevatedmarketingAuthor Commented:
I know this is cheesy, but I copied the code from the page you suggested.   I'm the copy and paste king...  But here's my code.

*************************************

<%
'Uncomment ONLY after debugging is complete
'on error resume next

Dim mySmartUpload 'declare the component
Dim intCount ' counter for the number of uploaded files
Dim File 'declare the file to upload
Dim filename 'Temp filename
Dim nextPage 'Next Page to forward to

intCount=0 'initialize the counter

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

'limit the file size to 50 Kb, Larger size not recommended
mySmartUpload.MaxFileSize = 50000

' limit the file extensions to pictures files
mySmartUpload.allowedFilesList="gif,jpg"

'Select files on the user computer
mySmartUpload.Upload

' checking all the files
For each file in mySmartUpload.Files
 If not File.IsMissing then
' Add a session number to the file name
  filename="../upload/" &session.sessionID & "_" & file.FileName

  file.SaveAs(filename)

  intCount = intCount + 1
 End If
Next

' initialize the object
Set mySmartUpload=nothing

' error managment
If Err.Number = 0 then
  nextPage = "asplook.asp?file=" & filename & ""
Else
  nextPage = "asplook.asp?msg=An error as occured. Try again"
End if

' redirect to the result display
Response.redirect nextPage
%>

************************************

Thanks for your help so far!

Adam
0
 
fritz_the_blankCommented:
Okay, the good news is that if you got as far as line 31, then the Upload component is installed.

What happens if you change this line:

  filename="../upload/" &session.sessionID & "_" & file.FileName


to this:

  filename= session.sessionID & "_" & file.FileName

FtB
0
 
elevatedmarketingAuthor Commented:
Glad to know ASPSmartUpload's installed...

Make the suggested change and still the same error message, same line.

Adam
0
 
alorentzCommented:
Sounds like permissions problem!  Do you (IUSR account) have permission to write to that directory?
0
 
fritz_the_blankCommented:
Okay, let's comment the line out altogether, like this with an apostrophe at the start of the line:

'filename="../upload/" &session.sessionID & "_" & file.FileName


FtB
0
 
elevatedmarketingAuthor Commented:
which directory should I modify in my hosting control panel?  the whole thing?
0
 
fritz_the_blankCommented:
@alorentz--

It is pointing to the root directory right now.

FtB
0
 
elevatedmarketingAuthor Commented:
OK.  Making progress...

Now the Error is:

aspSmartUpload.File error '80040474'

The destination must be specified (Error 1140)

/asp/upload.asp, line 31


_______________________________

Also, just so you know, line 31 is the following line:

  file.SaveAs(filename)

NOT
filename="../upload/" &session.sessionID & "_" & file.FileName

0
 
alorentzCommented:
Maybe no permissions to add files at all anywhere...?  Have to talk to Host about that.
0
 
fritz_the_blankCommented:
Sorry, I am being a bozo!!

Let's not comment out the line, but make it like this:

 filename= file.FileName

FtB

0
 
elevatedmarketingAuthor Commented:
Same error message...

aspSmartUpload.File error '80040460'

Unable to save file (Error 1120)

/asp/upload.asp, line 31
0
 
fritz_the_blankCommented:
According to this:

http://www.aspsmart.com/scripts/aspSmartUpload/publigen/content/templates/show.asp?P=267&L=EN

it may indeed be a permissions issue like alorentz suggested.

In order for this to work, the IUSR_ and IWAM_ accounts must have READ/WRITE permissions to the directory.

If you don't know how to do this yourself, or do not have the means to do this, contact your hosting company and tell them what is needed.

See also:

http://p2p.wrox.com/topic.asp?TOPIC_ID=13417

FtB
0
 
fritz_the_blankCommented:
One other thing to try in case this is a path issue:



filename= Server.MapPath(".\") & file.FileName
0
 
elevatedmarketingAuthor Commented:
OK.  That did something because this is the message I'm getting now...

aspSmartUpload.File error '80040451'

Size exceeded for this file : '\cross.jpg' (Error 1105)

/asp/upload.asp, line 23
0
 
fritz_the_blankCommented:
Oh, that is very good news!

That means that the file is too big!

Please try a small file, and if that works, I'll show you how to increase the allowed size.

FtB
0
 
fritz_the_blankCommented:
These lines limit the upload to 50k:

'limit the file size to 50 Kb, Larger size not recommended
mySmartUpload.MaxFileSize = 50000


To change that, just adjust the number to something higher:

'limit the file size to 50 Kb, Larger size not recommended
mySmartUpload.MaxFileSize = 250000


FtB
0
 
fritz_the_blankCommented:
Okay, so I have provided a step by step sample as requested, figured out why the code was crashing (it was a path issue) and then provided a fix for that. Unless I am mistaken, once you change the file size property, that should remove your final error.

Fritz the Blank
0
 
elevatedmarketingAuthor Commented:
Fritz, I don't know what has happened, but it's reverted back to the old Error.  I've redone what we just went through and now I can't get that one error about file size back.  Here's the code I have now.  Please advise and the points are yours!  (I kindof feel like Santa Claus!)
**************************

<%
'Uncomment ONLY after debugging is complete
'on error resume next

Dim mySmartUpload 'declare the component
Dim intCount ' counter for the number of uploaded files
Dim File 'declare the file to upload
Dim filename 'Temp filename
Dim nextPage 'Next Page to forward to

intCount=0 'initialize the counter

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

'limit the file size to 50 Kb, Larger size not recommended
mySmartUpload.MaxFileSize = 50000

' limit the file extensions to pictures files
mySmartUpload.allowedFilesList="gif,jpg"

'Select files on the user computer
mySmartUpload.Upload

' checking all the files
For each file in mySmartUpload.Files
 If not File.IsMissing then
' Add a session number to the file name
filename= Server.MapPath(".\") & file.FileName
       
  file.SaveAs(filename)

  intCount = intCount + 1
 End If
Next

' initialize the object
Set mySmartUpload=nothing

' error managment
If Err.Number = 0 then
  nextPage = "asplook.asp?file=" & filename & ""
Else
  nextPage = "asplook.asp?msg=An error as occured. Try again"
End if

' redirect to the result display
Response.redirect nextPage
%>

********************************

Did I miss something?
0
 
fritz_the_blankCommented:
What is the error and line number? Also, what size of file were you uploading?

FtB
0
 
elevatedmarketingAuthor Commented:
THe Error is:

aspSmartUpload.File error '80040460'

Unable to save file (Error 1120)

/asp/upload.asp, line 31


The file is 4.07 Kb.
0
 
elevatedmarketingAuthor Commented:
But also, when I try to upload a file too big, I get this (I've not changed the ASP page):

aspSmartUpload.File error '80040451'

Size exceeded for this file : '\cross.jpg' (Error 1105)

/asp/upload.asp, line 23
0
 
fritz_the_blankCommented:
Okay, try this:

For each file in mySmartUpload.Files
 If not File.IsMissing then
' Add a session number to the file name
filename= Server.MapPath(".\") & file.FileName
  response.write(finename & "<P>")
  response.end    
  file.SaveAs(filename)

  intCount = intCount + 1
 End If
Next
0
 
elevatedmarketingAuthor Commented:
OK.  That did something.  No error page now, but it just went to a blank screen.  Plus I looked on my site and the file is not on my server.
0
 
fritz_the_blankCommented:
Sorry,I had a typo there. That should be:

For each file in mySmartUpload.Files
 If not File.IsMissing then
' Add a session number to the file name
filename= Server.MapPath(".\") & file.FileName
  response.write(filename & "<P>")
  response.end    
  file.SaveAs(filename)

  intCount = intCount + 1
 End If
Next


0
 
elevatedmarketingAuthor Commented:
OK.  Now this is what I got:

C:\Accounts\elevated\wwwRoot\aspalaskabike.jpg

Looked on my server and nothing there.

I feel we're right on the verge of something great here!
0
 
fritz_the_blankCommented:
Okay, that looks about right. Next modification:

For each file in mySmartUpload.Files
 If not File.IsMissing then
' Add a session number to the file name
filename= Server.MapPath(".\") & session.sessionID &"_" & file.FileName
  response.write(filename & "<P>")
  response.end    
  file.SaveAs(filename)

  intCount = intCount + 1
 End If
Next
0
 
elevatedmarketingAuthor Commented:
OK.  Now I got:

C:\Accounts\elevated\wwwRoot\asp1035689867_alaskabike.jpg
0
 
fritz_the_blankCommented:
Okay, one last stop:

<%
'Uncomment ONLY after debugging is complete
'on error resume next

Dim mySmartUpload 'declare the component
Dim intCount ' counter for the number of uploaded files
Dim File 'declare the file to upload
Dim filename 'Temp filename
Dim nextPage 'Next Page to forward to

intCount=0 'initialize the counter

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

'limit the file size to 50 Kb, Larger size not recommended
mySmartUpload.MaxFileSize = 250000

' limit the file extensions to pictures files
mySmartUpload.allowedFilesList="gif,jpg"

'Select files on the user computer
mySmartUpload.Upload
' checking all the files
For each file in mySmartUpload.Files
 If not File.IsMissing then
      ' Add a session number to the file name
      filename= Server.MapPath(".\") & session.sessionID & "_" & file.FileName
      file.SaveAs(filename)
      intCount = intCount + 1
 End If
Next

' initialize the object
Set mySmartUpload=nothing

' error managment
If Err.Number = 0 then
  nextPage = "asplook.asp?file=" & filename & ""
Else
  nextPage = "asplook.asp?msg=An error as occured. Try again"
End if

' redirect to the result display
Response.redirect nextPage
%>
0
 
elevatedmarketingAuthor Commented:
Back to the old error message:

aspSmartUpload.File error '80040460'

Unable to save file (Error 1120)

/asp/upload.asp, line 29


For clarification, I just cut and pasted your last code as my asp page.  That was right, right?
0
 
fritz_the_blankCommented:
You have done everything correctly.

The whole point of the last few posts was to ensure that you had a proper path specified, that the name of the file was making it, that it had a unique name and etc. and etc. These tests show that everything is as it should be.

This definitely appears to be a permissions issue, so you will have to follow up with your hosting service. Explain to them that the IUSR_ and IWAM_ accounts need to have Read/Write permissions to this directory.

FtB
0
 
elevatedmarketingAuthor Commented:
I've submitted the ticket to them and I'll get back to you ASAP.  Thanks for all your help!  I look forward to giving you those points.

Should I revert back to the previous version of the ASP page for is the whole page post you posted 3 posts ok to serve as my code?
0
 
fritz_the_blankCommented:
Please stay with the most recent version. The tests that we performed above show that everything is as it should be.

FtB
0
 
elevatedmarketingAuthor Commented:
I'm on with TS at my hosting company.  Hope to get this resolved ASAP.

Adam
0
 
elevatedmarketingAuthor Commented:
OK.  TS was able to isolate the issue and get it fixed.  This is the final ASP Upload code that works:

________________________________________
<%
'Uncomment ONLY after debugging is complete
'on error resume next

Dim mySmartUpload 'declare the component
Dim intCount ' counter for the number of uploaded files
Dim File 'declare the file to upload
Dim filename 'Temp filename
Dim nextPage 'Next Page to forward to

intCount=0 'initialize the counter

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

'limit the file size to 50 Kb, Larger size not recommended
mySmartUpload.MaxFileSize = 250000

' limit the file extensions to pictures files
mySmartUpload.allowedFilesList="gif,jpg"

'Select files on the user computer
mySmartUpload.Upload
' checking all the files
For each file in mySmartUpload.Files
 If not File.IsMissing then
     ' Add a session number to the file name
     filename= Server.MapPath(".\") & "\" & file.FileName
     file.SaveAs(filename)
     intCount = intCount + 1
 End If
Next

' initialize the object
Set mySmartUpload=nothing

' error managment
If Err.Number = 0 then
  nextPage = "asplook.asp?file=" & filename & ""
Else
  nextPage = "asplook.asp?msg=An error as occured. Try again"
End if

' redirect to the result display
Response.redirect nextPage
%>

_______________________________________________________

Now 2 things:

1.  the files are being uploaded to the rootdirectory and not my directory called "uploads".  How do I change that?

2.  on the following page "asplook.asp"  the image will not display.  Here's the code:

_________________________



<HTML>
<BODY BGCOLOR="white">
<%
if IsEmpty(request.querystring("msg")) then
%>
<img src="<%=request.querystring("file")%>">
<%
else
%>
<%=request.querystring("msg")%>
<%
end if
%>
</BODY>
</HTML>

_____________________________________

Thanks!
0
 
alorentzCommented:
See told ya it was permissions :)

Good luck!
0
 
fritz_the_blankCommented:
I am not sure that I see what the difference is. Did they say it was a  permissions issue or did they change anything in the code?

About your remaining questions:

1) Do you actually have a directory named uploads in your web root?
2) there is no image tag here: <%=request.querystring("msg")%>

FtB
0
 
fritz_the_blankCommented:
If you are sure that you have a directory named uploads off of your root, then just do:

filename= Server.MapPath(".\") & "\Uploads\" & file.FileName


FtB
0
 
alorentzCommented:
If you need assistance closing this question, please let me know...thanks.
0
 
elevatedmarketingAuthor Commented:
Well, the did change the code a bit in the Server Map Path--but that may have been a smoke screen for not being able to change the permissions as quickly as they should have...

I do have a directory named uploads.  I made the suggested changes, putting in the "\uploads\" command, but still get the same error as eariler.  

What I'm also wanting it to do is return the http: address where that image just uploaded can be found, and also the image that was just uploaded.
0
 
fritz_the_blankCommented:
Okay, we need to stay focused and deal with the most pressing issue at hand. If you have a series of other questions, perhaps you can post them in separate threads.

This is what I had:

filename= Server.MapPath(".\") & session.sessionID & "_" & file.FileName

This is in your new code:

filename= Server.MapPath(".\") & "\" & file.FileName

The difference here is that what I have will uniquely name each file. That way, if two users try to upload a file with the same name, one won't overwrite the other.

Now, you are telling me that you have a directory named uploads? As a test, put an image in that directory, and then tell me what you have to put in the URL to see it.

FtB
0
 
elevatedmarketingAuthor Commented:
http://www.elevatedmarketing.com/asp/uploads/naples.jpg  (this is where I want the files to be uploaded to and have this same link returned for later entry into a database.

I'm not worried about other users uploading same-named files because there are only two users and once the file is uploaded, it will be done and not need to be revisited.  

0
 
fritz_the_blankCommented:
Okay, if your page is in the root directory, then maybe instead of this:

filename= Server.MapPath(".\") & "\" & file.FileName

you need this:

filename= Server.MapPath(".\") & "\asp\uploads\" & file.FileName

FtB
0
 
elevatedmarketingAuthor Commented:
Back to the same old error:

aspSmartUpload.File error '80040460'

Unable to save file (Error 1120)

/asp/upload.asp, line 29

It was uploading fine right before we did that just now.  It's currently uploading them to the root directory.
0
 
fritz_the_blankCommented:
Is your upload page in the root directory or in the asp directory?

FtB
0
 
elevatedmarketingAuthor Commented:
asp directory
0
 
fritz_the_blankCommented:
Okay, then I think that this should be it:

filename= Server.MapPath(".\") & "\uploads\" & file.FileName

FtB
0
 
fritz_the_blankCommented:
If not, then we will troubleshoot further.

FtB
0
 
elevatedmarketingAuthor Commented:
Didn't work.  Same error.
0
 
fritz_the_blankCommented:
Okay, here we go again.

<%
'Uncomment ONLY after debugging is complete
'on error resume next

Dim mySmartUpload 'declare the component
Dim intCount ' counter for the number of uploaded files
Dim File 'declare the file to upload
Dim filename 'Temp filename
Dim nextPage 'Next Page to forward to

intCount=0 'initialize the counter

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

'limit the file size to 50 Kb, Larger size not recommended
mySmartUpload.MaxFileSize = 250000

' limit the file extensions to pictures files
mySmartUpload.allowedFilesList="gif,jpg"

'Select files on the user computer
mySmartUpload.Upload
' checking all the files
For each file in mySmartUpload.Files
 If not File.IsMissing then
     ' Add a session number to the file name
     response.write(Server.MapPath(".\") & "\" & file.FileName)
     response.end
     filename= Server.MapPath(".\") & "\" & file.FileName
     file.SaveAs(filename)
     intCount = intCount + 1
 End If
Next

' initialize the object
Set mySmartUpload=nothing

' error managment
If Err.Number = 0 then
  nextPage = "asplook.asp?file=" & filename & ""
Else
  nextPage = "asplook.asp?msg=An error as occured. Try again"
End if

' redirect to the result display
Response.redirect nextPage
%>
0
 
elevatedmarketingAuthor Commented:
now it's returning this after the "upload"

C:\Accounts\elevated\wwwRoot\asp\AA048570.JPG

BUT it's not actually uploading them to the server.
0
 
fritz_the_blankCommented:
Please understand, this is not to upload but to troubleshoot--the part of the code that does the uploading will never execute because of the response.end. Doing what we are doing here allows us to see what is going on; think about this for a minute--I don't know your directory structure and I can't test!!!!!

Okay, back to this.

This path does not look good:

C:\Accounts\elevated\wwwRoot\asp\AA048570.JPG

It is missing the Upload directory. Let's try:

<%
'Uncomment ONLY after debugging is complete
'on error resume next

Dim mySmartUpload 'declare the component
Dim intCount ' counter for the number of uploaded files
Dim File 'declare the file to upload
Dim filename 'Temp filename
Dim nextPage 'Next Page to forward to

intCount=0 'initialize the counter

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

'limit the file size to 50 Kb, Larger size not recommended
mySmartUpload.MaxFileSize = 250000

' limit the file extensions to pictures files
mySmartUpload.allowedFilesList="gif,jpg"

'Select files on the user computer
mySmartUpload.Upload
' checking all the files
For each file in mySmartUpload.Files
 If not File.IsMissing then
     ' Add a session number to the file name
     response.write(Server.MapPath(".\") & "\uploads\" & file.FileName)
     response.end
     filename= Server.MapPath(".\") & "\uploads\" & file.FileName
     file.SaveAs(filename)
     intCount = intCount + 1
 End If
Next

' initialize the object
Set mySmartUpload=nothing

' error managment
If Err.Number = 0 then
  nextPage = "asplook.asp?file=" & filename & ""
Else
  nextPage = "asplook.asp?msg=An error as occured. Try again"
End if

' redirect to the result display
Response.redirect nextPage
%>
0
 
elevatedmarketingAuthor Commented:
Now it returns:

C:\Accounts\elevated\wwwRoot\asp\uploads\bible.jpg

And sorry for jumping the gun...  You are definitely the man!
0
 
alorentzCommented:
>>You are definitely the man!

I thought I was the man?  ;)
0
 
elevatedmarketingAuthor Commented:
alorentz--you're really jockeying for these points?

haha
0
 
fritz_the_blankCommented:
Okay, so this looks exactly as it should, so theoretically, the code below should work. If it does not, then it is time to speak to your hosting folks again:

<%
'Uncomment ONLY after debugging is complete
'on error resume next

Dim mySmartUpload 'declare the component
Dim intCount ' counter for the number of uploaded files
Dim File 'declare the file to upload
Dim filename 'Temp filename
Dim nextPage 'Next Page to forward to

intCount=0 'initialize the counter

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

'limit the file size to 50 Kb, Larger size not recommended
mySmartUpload.MaxFileSize = 250000

' limit the file extensions to pictures files
mySmartUpload.allowedFilesList="gif,jpg"

'Select files on the user computer
mySmartUpload.Upload
' checking all the files
For each file in mySmartUpload.Files
 If not File.IsMissing then
     ' Add a session number to the file name
      filename= Server.MapPath(".\") & "\uploads\" & file.FileName
     file.SaveAs(filename)
     intCount = intCount + 1
 End If
Next

' initialize the object
Set mySmartUpload=nothing

' error managment
If Err.Number = 0 then
  nextPage = "asplook.asp?file=" & filename & ""
Else
  nextPage = "asplook.asp?msg=An error as occured. Try again"
End if

' redirect to the result display
Response.redirect nextPage
%>
0
 
elevatedmarketingAuthor Commented:
Brilliant!  It works!!!  It's in the correct directory and everything!

Now the only thing is the following asplook.asp page doesn't display the image.  It's coded exactly like the example you sent to me in the first response.
0
 
fritz_the_blankCommented:
Okay, this should be a different thread, but let's see what we can do here...

FtB
0
 
elevatedmarketingAuthor Commented:
Do you want me to start a new thread?  I'll be glad to.
0
 
fritz_the_blankCommented:
Let's try this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>

<BODY BGCOLOR="white">
<img src="<%=request.querystring("file")%>">
</BODY>
</HTML>


FtB
0
 
alorentzCommented:
>>alorentz--you're really jockeying for these points?

Well, if it was permissions problem, then yes...  If not, then no!  Giddee-up!

0
 
elevatedmarketingAuthor Commented:
alorentz--I'm not sure it was a permissions issue.  according to my hosting company, they said it wasn't--it was coding.  And I just don't know.  So I'm in a quandry here.
0
 
fritz_the_blankCommented:
So, did the last code sample display your image?

FtB
0
 
elevatedmarketingAuthor Commented:
Nothing.  Just the image icon with a red X on it.
0
 
fritz_the_blankCommented:
Okay, now if you right click on the image and choose properties, what do you see?

FtB
0
 
elevatedmarketingAuthor Commented:
the URL listed is:

file:///C:/Accounts/elevated/wwwRoot/asp/uploads/bible2.jpg
0
 
fritz_the_blankCommented:
Okay, I see the problem now and am thinking of the best way to fix this....

FtB
0
 
fritz_the_blankCommented:
<%
'Uncomment ONLY after debugging is complete
'on error resume next

Dim mySmartUpload 'declare the component
Dim intCount ' counter for the number of uploaded files
Dim File 'declare the file to upload
Dim filename 'Temp filename
Dim nextPage 'Next Page to forward to

intCount=0 'initialize the counter

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

'limit the file size to 50 Kb, Larger size not recommended
mySmartUpload.MaxFileSize = 250000

' limit the file extensions to pictures files
mySmartUpload.allowedFilesList="gif,jpg"

'Select files on the user computer
mySmartUpload.Upload
' checking all the files
For each file in mySmartUpload.Files
 If not File.IsMissing then
     ' Add a session number to the file name
      fileView = file.FileName
      filename= Server.MapPath(".\") & "\uploads\" & file.FileName
     file.SaveAs(filename)
     intCount = intCount + 1
 End If
Next

' initialize the object
Set mySmartUpload=nothing

' error managment
If Err.Number = 0 then
  nextPage = "asplook.asp?file=" & filename & ""
Else
  nextPage = "asplook.asp?msg=An error as occured. Try again"
End if

' redirect to the result display
Response.redirect nextPage
%>

And then:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>

<BODY BGCOLOR="white">
<img src="/Uploads/<%=request.querystring("fileview")%>">
</BODY>
</HTML>
0
 
elevatedmarketingAuthor Commented:
Ok.  Same image with the X and here's the properties:

http://www.elevatedmarketing.com/Uploads/

No filename at all.
0
 
fritz_the_blankCommented:
Perhaps it is a Case issue. Please try again:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>

<BODY BGCOLOR="white">
<img src="/Uploads/<%=request.querystring("fileView")%>">
</BODY>
</HTML>

0
 
elevatedmarketingAuthor Commented:
Still nothing.  no filename in the properties.
0
 
fritz_the_blankCommented:
Are you using this code? There is an extra line added:

<%
'Uncomment ONLY after debugging is complete
'on error resume next

Dim mySmartUpload 'declare the component
Dim intCount ' counter for the number of uploaded files
Dim File 'declare the file to upload
Dim filename 'Temp filename
Dim nextPage 'Next Page to forward to

intCount=0 'initialize the counter

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

'limit the file size to 50 Kb, Larger size not recommended
mySmartUpload.MaxFileSize = 250000

' limit the file extensions to pictures files
mySmartUpload.allowedFilesList="gif,jpg"

'Select files on the user computer
mySmartUpload.Upload
' checking all the files
For each file in mySmartUpload.Files
 If not File.IsMissing then
     ' Add a session number to the file name
      fileView = file.FileName
      filename= Server.MapPath(".\") & "\uploads\" & file.FileName
     file.SaveAs(filename)
     intCount = intCount + 1
 End If
Next

' initialize the object
Set mySmartUpload=nothing

' error managment
If Err.Number = 0 then
  nextPage = "asplook.asp?file=" & filename & ""
Else
  nextPage = "asplook.asp?msg=An error as occured. Try again"
End if

' redirect to the result display
Response.redirect nextPage
%>

And then:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>

<BODY BGCOLOR="white">
<img src="/Uploads/<%=request.querystring("fileview")%>">
</BODY>
</HTML>
0
 
elevatedmarketingAuthor Commented:
<%
'Uncomment ONLY after debugging is complete
'on error resume next

Dim mySmartUpload 'declare the component
Dim intCount ' counter for the number of uploaded files
Dim File 'declare the file to upload
Dim filename 'Temp filename
Dim nextPage 'Next Page to forward to

intCount=0 'initialize the counter

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

'limit the file size to 50 Kb, Larger size not recommended
mySmartUpload.MaxFileSize = 250000

' limit the file extensions to pictures files
mySmartUpload.allowedFilesList="gif,jpg"

'Select files on the user computer
mySmartUpload.Upload
' checking all the files
For each file in mySmartUpload.Files
 If not File.IsMissing then
     ' Add a session number to the file name
      fileView = file.FileName
      filename= Server.MapPath(".\") & "\uploads\" & file.FileName
     file.SaveAs(filename)
     intCount = intCount + 1
 End If
Next

' initialize the object
Set mySmartUpload=nothing

' error managment
If Err.Number = 0 then
  nextPage = "asplook.asp?file=" & filename & ""
Else
  nextPage = "asplook.asp?msg=An error as occured. Try again"
End if

' redirect to the result display
Response.redirect nextPage
%>

___________________________

then


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>

<BODY BGCOLOR="white">
<img src="/Uploads/<%=request.querystring("fileView")%>">
</BODY>
</HTML>
0
 
fritz_the_blankCommented:
Oh boy! Am I ever stupid!!!!

Please change this line:

 nextPage = "asplook.asp?file=" & filename & ""


To:

 nextPage = "asplook.asp?fileView=" & fileView & ""
0
 
elevatedmarketingAuthor Commented:
YOU DID IT!  YOU ARE THE MAN!  It works!

I think I can hear angels singing!

THank so much for the help!
0
 
fritz_the_blankCommented:
Glad to have helped and good luck with your project.

FtB
0
 
elevatedmarketingAuthor Commented:
I really appreciate it and I'm sure I'll be back!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 39
  • 36
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now