mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
converte file to blob
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user