@@ -1368,7 +1368,7 @@ describe('Parse.File testing', () => {
13681368 await reconfigureServer ( {
13691369 fileUpload : {
13701370 enableForPublic : true ,
1371- fileExtensions : [ 'jpg' ] ,
1371+ fileExtensions : [ 'jpg' , 'wav' ] ,
13721372 } ,
13731373 } ) ;
13741374 await expectAsync (
@@ -1387,6 +1387,30 @@ describe('Parse.File testing', () => {
13871387 ) . toBeRejectedWith (
13881388 new Parse . Error ( Parse . Error . FILE_SAVE_ERROR , `File upload of extension html is disabled.` )
13891389 ) ;
1390+ await expectAsync (
1391+ request ( {
1392+ method : 'POST' ,
1393+ url : 'http://localhost:8378/1/files/file' ,
1394+ body : JSON . stringify ( {
1395+ _ApplicationId : 'test' ,
1396+ _JavaScriptKey : 'test' ,
1397+ _ContentType : 'image/jpg' ,
1398+ base64 : 'PGh0bWw+PC9odG1sPgo=' ,
1399+ } ) ,
1400+ } )
1401+ ) . toBeResolved ( ) ;
1402+ await expectAsync (
1403+ request ( {
1404+ method : 'POST' ,
1405+ url : 'http://localhost:8378/1/files/file' ,
1406+ body : JSON . stringify ( {
1407+ _ApplicationId : 'test' ,
1408+ _JavaScriptKey : 'test' ,
1409+ _ContentType : 'audio/wav' ,
1410+ base64 : 'UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA' ,
1411+ } ) ,
1412+ } )
1413+ ) . toBeResolved ( ) ;
13901414 } ) ;
13911415
13921416 it ( 'works with array without Content-Type' , async ( ) => {
0 commit comments