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.
@@ -265,13 +265,12 @@ declare class Media {
265
265
  static uploadTikTokMusic<T>(file: File, scheduler_id: string): AxiosPromise<Response<T>>;
266
266
  /**
267
267
  * Generate an S3 Presigned URL for direct upload.
268
- * Use this for large files (up to 2GB) to bypass the Laravel server.
269
268
  *
270
269
  * @param filename The original name of the file.
271
270
  * @param extension The file extension (e.g., 'mp4').
272
- * @returns AxiosPromise containing upload_url and file_path.
271
+ * @param is_public Set to true if the file should be publicly accessible via URL.
273
272
  */
274
- static getPresignedUrl<T = PresignedUrlResponse>(filename: string, extension: string): AxiosPromise<Response<T>>;
273
+ static getPresignedUrl<T = PresignedUrlResponse>(filename: string, extension: string, is_public?: boolean): AxiosPromise<Response<T>>;
275
274
  /**
276
275
  * Confirm a successful S3 upload and create the database record.
277
276
  * Call this after the direct S3 upload is complete.
package/dist/esm/index.js CHANGED
@@ -15146,14 +15146,19 @@ var Media = /** @class */ (function () {
15146
15146
  };
15147
15147
  /**
15148
15148
  * Generate an S3 Presigned URL for direct upload.
15149
- * Use this for large files (up to 2GB) to bypass the Laravel server.
15150
15149
  *
15151
15150
  * @param filename The original name of the file.
15152
15151
  * @param extension The file extension (e.g., 'mp4').
15153
- * @returns AxiosPromise containing upload_url and file_path.
15152
+ * @param is_public Set to true if the file should be publicly accessible via URL.
15154
15153
  */
15155
- Media.getPresignedUrl = function (filename, extension) {
15156
- return Requests.processRoute(MediaRoute.routes.getPresignedUrl, { filename: filename, extension: extension });
15154
+ Media.getPresignedUrl = function (filename, extension, is_public // Added parameter
15155
+ ) {
15156
+ if (is_public === void 0) { is_public = false; }
15157
+ return Requests.processRoute(MediaRoute.routes.getPresignedUrl, {
15158
+ filename: filename,
15159
+ extension: extension,
15160
+ is_public: is_public // Pass to backend
15161
+ });
15157
15162
  };
15158
15163
  /**
15159
15164
  * Confirm a successful S3 upload and create the database record.