UNPKG

@oystehr/sdk

Version:

Oystehr SDK

14 lines (12 loc) 446 B
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, }); } export { uploadFile }; //# sourceMappingURL=zambda-ext.js.map