@oystehr/sdk
Version:
Oystehr SDK
16 lines (13 loc) • 472 B
JavaScript
;
function baseUrlThunk() {
return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
}
async function uploadFile({ id, file, filename, }) {
const uploadUrl = await this.request('/zambda/{id}/s3-upload', 'post', baseUrlThunk.bind(this))({ id, filename });
await fetch(uploadUrl.signedUrl, {
method: 'PUT',
body: file,
});
}
exports.uploadFile = uploadFile;
//# sourceMappingURL=zambda-ext.cjs.map