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/cjs/index.js
CHANGED
|
@@ -18633,6 +18633,9 @@ var Requests = /** @class */ (function () {
|
|
|
18633
18633
|
});
|
|
18634
18634
|
};
|
|
18635
18635
|
Requests.uploadBlob = function (url, filename, blob, data, params, onUploadProgress) {
|
|
18636
|
+
if (!url.startsWith('/api')) {
|
|
18637
|
+
url = "/api".concat(url);
|
|
18638
|
+
}
|
|
18636
18639
|
// Process URL and params
|
|
18637
18640
|
if (params && Object.keys(params).length > 0) {
|
|
18638
18641
|
var queryString = Object.entries(params)
|
|
@@ -18677,6 +18680,9 @@ var Requests = /** @class */ (function () {
|
|
|
18677
18680
|
return __generator(this, function (_a) {
|
|
18678
18681
|
switch (_a.label) {
|
|
18679
18682
|
case 0:
|
|
18683
|
+
if (!uploadUrl.startsWith('/api')) {
|
|
18684
|
+
uploadUrl = "/api".concat(uploadUrl);
|
|
18685
|
+
}
|
|
18680
18686
|
if (!chunkSize) {
|
|
18681
18687
|
chunkSize = 1024 * 1024;
|
|
18682
18688
|
}
|