Blob
Construct a Blob with the given stream of data. The passed stream will be closed when it is copied either to memory (see getContent
) or to the database. If it is closed before that, by client code, the attempt to store the blob will fail. The converse is also true: the stream for a blob that is not saved or copied to memory will not be closed (except during garbage collection).
Parameters
The type of content this Blob will represent
The stream of data that this Blob will consume
Construct a Blob with the content of a file. The blob can then be added as a property of a Document. This constructor creates a stream that is not closed until the blob is stored in the db, or copied to memory (except by garbage collection).
Parameters
The type of content this Blob will represent
A URL to a file containing the data that this Blob will represent.
Throws
on failure to open the file URL