Boffin Codersts-netstorageapi-akamaiby Boffin Coders

Transfer

downloadBuffer GET

Download a file into memory.

const { buffer } = await ns.downloadBufferAsync("/123456/static/logo.png");
const bytes = Buffer.from(buffer as unknown as string, "binary");

Signatures

downloadBufferAsync(ns_path: string): Promise<DownloadBufferResponse>
downloadBuffer(ns_path: string, callback: (err: any, res?: http.IncomingMessage, body?: DownloadBufferResponse) => void): void

Parameters

NameTypeDescription
ns_pathstringNetStorage file path (not a directory).

Returns

DownloadBufferResponse

{ buffer, message: "Download Done." }

On the wire

HTTP methodGET
X-Akamai-ACS-Actionversion=1&action=download
Signed withX-Akamai-ACS-Auth-Data and X-Akamai-ACS-Auth-Sign (HMAC-SHA256)
CLIakamai-netstorage cat static/app.js

Build and sign this request in the playground →

Notes

← downloaddir →