Database Reference
In-Depth Information
One might ask why this new option is shown. After all, don't we want to upload to
the BLOB repository? Maybe! But as this LONGBLOB column may also hold regular
data, two possibilities exist:
Clicking the
Upload to BLOB repository option, and then browsing for a file
or picking one in the web server upload directory. This will send the file to
the repository for streaming later.
Not clicking the option, thereby sending the data directory to this column
(not for streaming later).
Obviously, we pick the first choice and upload our favorite movie (we can try a short
one first). If the upload works well, we'll see a query similar to this:
UPDATE `marc_book`.`book`
SET `cover_photo` = '~*marc_book/~1-150-15591197-0*3907219'
WHERE `book`.`isbn` = '1-234567-22-0' LIMIT 1;
Here, cover_photo was updated with the BLOB reference, a number generated by
the PBMS storage engine.
Streaming the data from repository
When browsing our table and looking at the row for which we made an upload into
the BLOB repository, we see, under the cover_photo column, depending on the data
format, one of these messages:
View
image
Play audio
View video
Download file•
Clicking on the displayed message starts streaming directly from the server's port
8080 to our browser, sending the appropriate MIME type to inform the browser
about which format to expect.
We also see the MIME type of the uploaded data (here video/mp4 ).
 
Search WWH ::




Custom Search