Closed benkhachouch closed 7 years ago
I believe you only need to add the following lines:
var header:URLRequestHeader = new URLRequestHeader("Authorization", "Bearer "+authToken);
//Then in the request body
request.requestHeaders.push(header);
hello,
Thanks for your tutorial.Very usefull. i can upload file (without progress event) but i have a error ("bad request") when i want to upload file.with progress event.
Please where is my fault? public static function uploadFileVideo(authToken:String,url,file:File):void { var header:URLRequestHeader = new URLRequestHeader("Authorization", "Bearer " + authToken); var request:URLRequest = new URLRequest(Constants.FIREBASE_STORAGE_URL +url) request.requestHeaders.push(header); file.addEventListener(ProgressEvent.PROGRESS, progressHandler); file.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, uploadCompleteDataHandler);