Skip to content

Sending a RAM array instead of a file using storage.upload() #115

Answered by mobizt
Radistor asked this question in Q&A
Discussion options

You must be logged in to vote

Define the BlobConfig object globally.

Then set your image buffer pointer and its length with the object defined.

BlobConfig upload_data; // Global define

setup()
{
    upload_data,setBlob(fb->buf, fb->len);
    
    // Firebase Storage
    storage.upload(aClient, FirebaseStorage::Parent(STORAGE_BUCKET_ID, "filename.jpg"), getBlob(upload_data), "image/jpeg", asyncCB, "uploadTask");

    // Cloud Storage
    cstorage.upload(aClient, GoogleCloudStorage::Parent(STORAGE_BUCKET_ID, "filename.jpg"), getBlob(upload_data), "image/jpeg", asyncCB, "uploadTask");
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mobizt
Comment options

Answer selected by Radistor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants