@noatgnu/cupcake-vanilla 1.2.5 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1763,13 +1763,14 @@ class ChunkedUploadService extends BaseApiService {
1763
1763
  ? `${this.apiUrl}/chunked-upload/${uploadId}/`
1764
1764
  : `${this.apiUrl}/chunked-upload/`;
1765
1765
  const httpOptions = {};
1766
- if (offset !== undefined && totalSize !== undefined) {
1766
+ const isChunkedUpload = offset !== undefined && totalSize !== undefined;
1767
+ if (isChunkedUpload) {
1767
1768
  const chunkEnd = offset + request.file.size - 1;
1768
1769
  httpOptions.headers = {
1769
1770
  'Content-Range': `bytes ${offset}-${chunkEnd}/${totalSize}`
1770
1771
  };
1771
1772
  }
1772
- if (uploadId) {
1773
+ if (isChunkedUpload || uploadId) {
1773
1774
  return this.put(url, formData, httpOptions);
1774
1775
  }
1775
1776
  else {