Upload an image to google app engine blobstore with java programmatically

后端 未结 2 560
粉色の甜心
粉色の甜心 2020-12-17 07:01

I have already watched \"Writing Files to the Blobstore (Experimental)\" in the google app engine page.

This is what I have :

// Get a file service
          


        
2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-17 08:03

    You can simply write binary data to blobstore:

    byte[] yourBinaryData = // get your data from request
    writeChannel.write(ByteBuffer.wrap(yourBinaryData));
    

提交回复
热议问题