Request.BinaryRead() 
Author Message
 Request.BinaryRead()

I need some help with Request.BinaryRead()...

BinaryRead() returns a variant array with binary data? If so, how can I get
access to that stream of bytes? I have tried:

    var arrayOfBytes = Request.BinaryRead(Request.TotalBytes);

But when trying to use:

    x = arrayOfBytes[1];

I got an error telling me that arrayOfBytes[1] is not an object!

What I want to do is allow the client to upload a file and save that file
somewhere on the server!

Please, help!

Fred



Tue, 20 May 2003 03:00:00 GMT  
 Request.BinaryRead()
If this were VBScript, you could use a combination of LenB(), MidB(), AscB(), and Chr() to extract
data one byte at a time.  Or you could Request.BinaryRead(1) up to Request.TotalBytes times to get
one byte at a time.

But since this is JScript, you only have the option of trying Request.BinaryRead(1) up to
Request.TotalBytes times.  That's assuming you can figure out how JScript deals with variants of
subtype byte...

You do know they make commercial components to do this ;-)...  If this is just Intranet, you might
want to try the Microsoft Posting Acceptor.  Not as full featured, but it's free...

Web Workshop - Posting Acceptor, Part 1
http://msdn.microsoft.com/workshop/server/asp/server052499.asp

Web Workshop - Posting Acceptor, Part 2
http://msdn.microsoft.com/workshop/server/asp/server062899.asp

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup...
--


Quote:
> I need some help with Request.BinaryRead()...

> BinaryRead() returns a variant array with binary data? If so, how can I get
> access to that stream of bytes? I have tried:

>     var arrayOfBytes = Request.BinaryRead(Request.TotalBytes);

> But when trying to use:

>     x = arrayOfBytes[1];

> I got an error telling me that arrayOfBytes[1] is not an object!

> What I want to do is allow the client to upload a file and save that file
> somewhere on the server!

> Please, help!

> Fred



Tue, 20 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Request.BinaryRead and ASP (VBScript)

2. Request.BinaryRead & ASP (VBScript)

3. JScript and Request.BinaryRead()...

4. How can I access the data in a variant ( Request.BinaryRead( n ) )

5. VB request.binaryread ?

6. What does Request.BinaryRead return?

7. Request.BinaryRead()

8. After 'Request.BinaryRead' ?

9. Request.BinaryRead & VBscript (asp) ?

10. After 'Request.BinaryRead' ?

11. BinaryRead - howto convert binary string back to string array

12. BinaryRead and VT_ARRAY | VT_UI1.

 

 
Powered by phpBB® Forum Software