Closed benkhachouch closed 7 years ago
Sorry, I haven't worked with video yet, I'm unable to help you on this one.
But my guess is that you can convert the data from CameraUI to a bytearray and save it as .mp4
it is the same discussion for uploading à file (zip,pdf..no image) l Know how create bytearray from file with filestream and .readbytes but i dont Know how make the request.
Le 20 avr. 2017 01:39, "Mr. Phantom" notifications@github.com a écrit :
Sorry, I haven't worked with video yet, I'm unable to help you on this one.
But my guess is that you can convert the data from CameraUI to a bytearray and save it as .mp4
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PhantomAppDevelopment/pizza-app/issues/12#issuecomment-295494812, or mute the thread https://github.com/notifications/unsubscribe-auth/AMYpy0290_XosiAEhQSYxT39VScVY8AMks5rxpsfgaJpZM4NCQvk .
I recommend reading this part of the guide:
https://github.com/PhantomAppDevelopment/firebase-as3/tree/master/storage#uploading-a-file-with-auth
It shows you the minimum code to send a file to Firebase Storage. Once you have a bytearray it's super easy.
Thanks very much!
Le 20 avr. 2017 02:05, "Mr. Phantom" notifications@github.com a écrit :
I recommend reading this part of the guide:
https://github.com/PhantomAppDevelopment/firebase-as3/tree/master/ storage#uploading-a-file-with-auth
It shows you the minimum code to send a file to Firebase Storage. Once you have a bytearray it's super easy.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PhantomAppDevelopment/pizza-app/issues/12#issuecomment-295502745, or mute the thread https://github.com/notifications/unsubscribe-auth/AMYpyxMPmfUNK_0-1htdYND7SP-tqc8Lks5rxqFAgaJpZM4NCQvk .
Please,
what changes i must do for upload a video in storage. what changes compared to image jpg; Thanks.
compared to
"now = new Date().getTime();
//We prepare the thumbnail for upload **var byteArray:ByteArray = new ByteArray();
var thumbBitmapData:BitmapData = scaleBMD(myBitmapData, "thumbnail"); thumbBitmapData.encode(new Rectangle(0, 0, thumbBitmapData.width, thumbBitmapData.height), new JPEGEncoderOptions(), byteArray);
var header:URLRequestHeader = new URLRequestHeader("Authorization", "Bearer " + _data.FirebaseAuthToken);
var request:URLRequest = new URLRequest(Constants.FIREBASE_STORAGE_URL + "images%2Fthumbs%2F" + String(now) + ".jpg"); request.method = URLRequestMethod.POST; request.data = byteArray; request.contentType = "image/jpeg"; request.requestHeaders.push(header);**
"