Boffin Codersts-netstorageapi-akamaiby Boffin Coders

Transfer

download GET

Download a file from NetStorage to the local disk.

await ns.downloadAsync("/123456/static/app.js", "./backup/");
// saved as ./backup/app.js

Signatures

downloadAsync(ns_path: string, local_destination: string): Promise<DownloadResponse>
download(ns_path: string, local_destination: string, callback: (err: any, res?: http.IncomingMessage, body?: DownloadResponse) => void): void

Parameters

NameTypeDescription
ns_pathstringNetStorage file path (not a directory).
local_destinationstringLocal file or existing directory. Pass "" to save under the NetStorage name in the current directory.

Returns

DownloadResponse

{ 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 download static/app.js backup/

Build and sign this request in the playground →

Notes

← uploadBufferdownloadBuffer →