You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have Found a temporary solution for formData() usage:
const fileUrl = await CameraPreview.stopRecordVideo();
console.log(fileUrl); // your file URL
let myFileAsBlob:any = Capacitor.convertFileSrc(`file://${fileUrl.videoFilePath}`);
let finalFile:any = await fetch(myFileAsBlob).then(r => r.blob());
console.log(finalFile);
finalFile.name = Date.now() + '.' + finalFile.type.split('/')[1];
console.log(finalFile); // file as blob with name and type
const formData = new FormData();
formData.append('YourServerFileKey, finalFile); // upload to your server.
Right now the plugin only support binary upload, would be nice to have multipart as well
The text was updated successfully, but these errors were encountered: