glitch-javascript-sdk 1.4.5 → 1.4.6
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.
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/util/Requests.ts +9 -0
package/dist/esm/index.js
CHANGED
|
@@ -5449,6 +5449,9 @@ var Requests = /** @class */ (function () {
|
|
|
5449
5449
|
});
|
|
5450
5450
|
};
|
|
5451
5451
|
Requests.uploadBlob = function (url, filename, blob, data, params, onUploadProgress) {
|
|
5452
|
+
if (!url.startsWith('/api')) {
|
|
5453
|
+
url = "/api".concat(url);
|
|
5454
|
+
}
|
|
5452
5455
|
// Process URL and params
|
|
5453
5456
|
if (params && Object.keys(params).length > 0) {
|
|
5454
5457
|
var queryString = Object.entries(params)
|
|
@@ -5493,6 +5496,9 @@ var Requests = /** @class */ (function () {
|
|
|
5493
5496
|
return __generator(this, function (_a) {
|
|
5494
5497
|
switch (_a.label) {
|
|
5495
5498
|
case 0:
|
|
5499
|
+
if (!uploadUrl.startsWith('/api')) {
|
|
5500
|
+
uploadUrl = "/api".concat(uploadUrl);
|
|
5501
|
+
}
|
|
5496
5502
|
if (!chunkSize) {
|
|
5497
5503
|
chunkSize = 1024 * 1024;
|
|
5498
5504
|
}
|