Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    javascript blob

    Hi,

    I have image (captured from webcam) which is represented as JavaScript blob object. I need to save it on the server. How can I send this object to datasource ?

    Thank you.

    #2
    Turn it into a String and send it as a DataSource field value.

    Note that if using FileItem to create the interface for the user to upload an image, this step is unnecessary.

    Comment


      #3
      Originally posted by Isomorphic View Post
      Turn it into a String and send it as a DataSource field value.

      Note that if using FileItem to create the interface for the user to upload an image, this step is unnecessary.
      no way to post binary data ?

      Comment


        #4
        As previously covered, FileItem lets you gather and post binary data.

        We're not sure why you've ended up with a JavaScript file object instead, but converting it to a String is the simplest way to save it to a DataSource.

        A more complicated way is to POST it to a custom servlet and use the server-side DataSource APIs to save it to a field of type "binary". Just providing an InputStream, byte[] or any similar type of binary data as a DataSourceField value works for the server-side DataSource APIs.

        Comment

        Working...
        X