glitch-javascript-sdk 3.0.0 → 3.0.1
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 +9 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Media.d.ts +2 -3
- package/dist/esm/index.js +9 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/package.json +1 -1
- package/src/api/Media.ts +11 -4
package/dist/cjs/index.js
CHANGED
|
@@ -28330,14 +28330,19 @@ var Media = /** @class */ (function () {
|
|
|
28330
28330
|
};
|
|
28331
28331
|
/**
|
|
28332
28332
|
* Generate an S3 Presigned URL for direct upload.
|
|
28333
|
-
* Use this for large files (up to 2GB) to bypass the Laravel server.
|
|
28334
28333
|
*
|
|
28335
28334
|
* @param filename The original name of the file.
|
|
28336
28335
|
* @param extension The file extension (e.g., 'mp4').
|
|
28337
|
-
* @
|
|
28336
|
+
* @param is_public Set to true if the file should be publicly accessible via URL.
|
|
28338
28337
|
*/
|
|
28339
|
-
Media.getPresignedUrl = function (filename, extension
|
|
28340
|
-
|
|
28338
|
+
Media.getPresignedUrl = function (filename, extension, is_public // Added parameter
|
|
28339
|
+
) {
|
|
28340
|
+
if (is_public === void 0) { is_public = false; }
|
|
28341
|
+
return Requests.processRoute(MediaRoute.routes.getPresignedUrl, {
|
|
28342
|
+
filename: filename,
|
|
28343
|
+
extension: extension,
|
|
28344
|
+
is_public: is_public // Pass to backend
|
|
28345
|
+
});
|
|
28341
28346
|
};
|
|
28342
28347
|
/**
|
|
28343
28348
|
* Confirm a successful S3 upload and create the database record.
|