converte file to blob

This commit is contained in:
Eudes Inácio
2022-03-21 10:44:53 +01:00
parent 79a897325e
commit 7fce5d006e
+3 -6
View File
@@ -681,14 +681,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
/* const imageData = await this.fileToBase64Service.convert(file).then((filee) => {
console.log('Add file', filee)
}) */
const response = await fetch(file);
const blob = await response.blob();
const blob2 = new Blob([blob])
console.log('Add file base64', file)
console.log('Add file blob', blob)
const blob = new Blob(file, { type: file.type })
console.log('Add file', blob)
const formData = new FormData();
formData.append("blobFile", blob2);
formData.append("blobFile", blob);
this.wsChatMethodsService.getDmRoom(roomId).send({
file: {