[thelist] Image Upload Problem

Casey aspnet at thecrookstons.com
Mon Apr 10 12:46:31 CDT 2006


Spotted it!  I often marvel at how often I catch my own mistakes moments 
after posting a plea for help.

> Dim picPath as String = uploadLarge.PostedFile.FileName

> 
> uploadThumb.PostedFile.SaveAs("E:\web\users\zzz.com\images_products\large\"
> + picTitle)

Casey


----- Original Message ----- 
From: "Casey" <aspnet at thecrookstons.com>
To: "The List" <thelist at lists.evolt.org>
Sent: Monday, April 10, 2006 12:11 PM
Subject: [thelist] Image Upload Problem


> In ASP.NET, we're allowing the client to upload images to the server. 
> There
> are two possible image types they might upload: small thumbnails and the
> large version of the thumb.
>
> The thumbnail upload works as it should.  The large does not.  The code 
> for
> both is almost identical but for the location to which the files are being
> saved.  The only other variable is the size of the file.  When an upload 
> is
> attempted, the message displayed by Span2 is "Upload Successfull." and the
> file appears in the correct folder on the server, but it seems to be
> corrupt.  It won't display in a browser, and when I re-down load the file
> via FTP, it won't open at all... Photoshop won't even recognize it.
>
> ???
>
> sub btnUpload2(Sender as Object, e as EventArgs)
> Dim picPath as String = uploadLarge.PostedFile.FileName
> Dim picTitle as string = System.IO.Path.GetFileName(picPath)
> Try
> 
> uploadThumb.PostedFile.SaveAs("E:\web\users\zzz.com\images_products\large\"
> + picTitle)
>  Span2.InnerHtml = "Upload Sucessfull.<br>File Name: " &  picTitle
>  Span2.visible=true
> catch Exp as exception
>  span2.InnerHtml = "An Error occured."
> End Try
> end sub
>
> Am I right in assuming that the file size might be the problem?  Thanks,
>
> Casey
> -- 
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt ! 



More information about the thelist mailing list