-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Probably not urgent, but features that simplify and optimize moving/copying files would be useful. Particularly if we can use steams or existing features of the storage service to make the moves use less memory on functions.
import { bucket } from "@nitric/sdk";
const pics = bucket('pics').for('reading', 'writing');
const archive = bucket('archive').for('reading', 'writing');
// One option - short, but maybe limiting since you couldn't copy between buckets - probably not good.
await pics.copy('source/pic.jpg', 'dest/pic-new.jpg');
// Other options - allow copying between buckets, but more code.
await archive.file('src/pic-new.jpg').copyTo(pics.file('dest/pic.jpg'));
await archive.copy('dest/pic.jpg', pics.file('source/pic.jpg'));
await archive.copy(archive.file('dest/pic-new.jpg'), pics.file('source/pic.jpg'));
await archive.file('dest/pic-new.jpg').copyFrom(pics.file('source/pic.jpg'));
await pics.file('source/pic.jpg').copyTo(archive.file('dest/pic-new.jpg'))Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers