File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
lib/services/livesync/playground Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { PubnubKeys } from "./preview-app-constants";
33const pako = require ( "pako" ) ;
44
55export class PreviewSdkService implements IPreviewSdkService {
6- private static MAX_FILES_UPLOAD_BYTE_LENGTH = 30000 ;
6+ private static MAX_FILES_UPLOAD_BYTE_LENGTH = 15 * 1024 * 1024 ; // In MBs
77 private messagingService : MessagingService = null ;
88 private instanceId : string = null ;
99 public connectedDevices : Device [ ] = [ ] ;
@@ -76,7 +76,8 @@ export class PreviewSdkService implements IPreviewSdkService {
7676 onSendingChange : ( sending : boolean ) => ( { } ) ,
7777 onBiggerFilesUpload : async ( filesContent , callback ) => {
7878 const gzippedContent = Buffer . from ( pako . gzip ( filesContent ) ) ;
79- const byteLength = gzippedContent . byteLength ;
79+ const byteLength = filesContent . length ;
80+
8081 if ( byteLength > PreviewSdkService . MAX_FILES_UPLOAD_BYTE_LENGTH ) {
8182 this . $logger . warn ( "The files to upload exceed the maximum allowed size of 15MB. Your app might not work as expected." ) ;
8283 }
You can’t perform that action at this time.
0 commit comments