Get file from temporary folder and upload to AWS Storage

I have an active document. I saved this document in png format to temporary folder (to local disk). And I want to get this file in a plugin and send this file to AWS Storage.

Save document:

const temporaryFolder = await getTemporaryFolder();
const temporaryFile = await temporaryFolder.createFile(“artboard-example.png”, {overwrite: true});
const activeDocument = app.activeDocument;, { maximizeCompatibility: true });

Get file:

const temporaryFolder = await getTemporaryFolder();
const photoshopFile = await temporaryFolder.getEntry(“artboard-example.png”);

I can’t send photoshopFile because I get an error:

TypeError: Cannot read property ‘byteLength’ of undefined
at isEmptyData (VM276 jsSha256.js:84)
at Sha256.update (VM276 jsSha256.js:29)
at Sha256.update (VM266 crossPlatformSha256.js:23)
at hmac (VM362 credentialDerivation.js:95)
at eval (VM362 credentialDerivation.js:42)
at step (VM363 tslib.es6.js:126)
at Object.eval [as next] (VM363 tslib.es6.js:107)
at eval (VM363 tslib.es6.js:100)
at new Promise ()
at __awaiter (VM363 tslib.es6.js:96)

How can I upload the file to AWS Storage?