Last active
April 13, 2023 16:43
-
-
Save malerba118/a5b24153dbc122863547cadda55b5530 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BinstaClient } from 'binsta'; | |
const FOLDER_ID = 'nw6iuC4rIK'; | |
const binsta = new BinstaClient(process.env.API_TOKEN); | |
const file = await binsta.files.get('JZ7tbWj45g'); | |
const root = await binsta.folders.get('root'); | |
const untitled = await binsta.folders.create(); | |
const photos = await binsta.folders.create({ name: 'photos' }); | |
const file = await binsta.files.create({ name: 'my-file' }); | |
const url = await binsta.files.createSignedUploadUrl({ file_id: file.id }); | |
await binsta.files.upload(url, file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment