Skip to main content

upload()

Uploads a file to an existing bucket.

// from client
const file = event.target.files[0];
const { data, error } = await kontenbase.storage.upload(file);
// from server
const file = req.files[0];
const { data, error } = await kontenbase.storage.upload(
file.buffer,
file.originalname,
);
note
  • Default bucket used is Kontenbase project id