Welcome Guest Search | Active Topics | Sign In | Register

AJAX Uploader Options
Gibran
Posted: Friday, October 28, 2011 10:06:03 AM
Rank: Newbie
Groups: Member

Joined: 10/25/2011
Posts: 7
Hi, I'm wondering if you can tell me how to achieve the same with the AJAXUploader. Note below, FileUpload1 is a the ASP.NET upload control.

Dim bmp As Bitmap = New Bitmap(FileUpload1.FileContent)
Dim img As System.Drawing.Image = System.Drawing.Image.FromStream(FileUpload1.PostedFile.InputStream)
eo_support
Posted: Friday, October 28, 2011 10:34:53 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You would do something like this:

Code: Visual Basic.NET
'Open the Stream object
Dim fileName As String = AJAXUploader1.PostedFiles(0).TempFileName
Dim stream As FileStream = File.OpenRead(fileName)

'Now load the image from the stream object
....

'Close the stream
stream.Close()


Thanks
Gibran
Posted: Friday, October 28, 2011 11:27:00 AM
Rank: Newbie
Groups: Member

Joined: 10/25/2011
Posts: 7
Thanks. And what's the equivalent to FileUpload1.FileContent? Again if FileUpload1 is the ASP.NET upload control.

Thanks,
Jim
Gibran
Posted: Friday, October 28, 2011 11:56:47 AM
Rank: Newbie
Groups: Member

Joined: 10/25/2011
Posts: 7
Oh, FileContent is the stream. Okay thanks.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.