NetTalk Central

Author Topic: Download from Blob  (Read 3260 times)

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Download from Blob
« on: April 14, 2010, 05:09:51 AM »
Hi,
How does the Web server know that a Memory String has been extracted from a BLOB and how does it know to serve the String instead of an actual file?
Thanks,
Ron Jolda

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Download from Blob
« Reply #1 on: April 14, 2010, 05:31:05 AM »
Hi Ron,
ALAIK, you need to BlobToFIle() and serve the file.
Regards
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Download from Blob
« Reply #2 on: April 14, 2010, 07:49:44 AM »
no, you certainly do not need to save the blob to a file, and then serve the file.

Ron - I presume you've examined example 40?

In it there is code in the WebHandler procedure, in the _SendFile method.
This code is before the parent call, and you'll notice ends with a RETURN if the requested "file" is found as a Blob.

You'll also notice that it makes a call to _SendMemory, sending the contents of the Blob (which was temporarily stored in sendString).

Cheers
Bruce