1

Imagine I have a file with this data:

lastModified: 1543877513859
lastModifiedDate: Tue Dec 04 2018 02:21:53 GMT+0330 (Iran Standard Time) {}
name: "ali.jpg"
objectURL: SafeUrlImpl
changingThisBreaksApplicationSecurity: "blob:http://localhost:4200/b45412e9-69ad-433f-b24d-b3833d705da4"
__proto__: SafeValueImpl
size: 16196
type: "image/jpeg"
webkitRelativePath: ""

So I want to get the binary data of this image. I read some info of how to get the content of image here. so I try to get the binary data with this:

const expecteadBinaryData= file.objectURL.
        changingThisBreaksApplicationSecurity.arrayBuffer();
        reader.onload = (e) => e.target.result;
        const expecteadBinaryData2 =reader.readAsDataURL(new Blob
          ([file.objectURL.changingThisBreaksApplicationSecurity]));

So I expect the result of expecteadBinaryData or expecteadBinaryData2 be a binary, but I get undefined. How should I get this?

Dipak Telangre
  • 1,792
  • 4
  • 19
  • 46
Ali Eshghi
  • 1,131
  • 1
  • 13
  • 30

0 Answers0