File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -64,16 +64,12 @@ async function start() {
6464 // @ts -ignore
6565 console . log ( response . result )
6666
67- const fileArray = await Deno . readFile ( './tests/resources/file.png' )
68- const fileBlob = new Blob ( [ fileArray . buffer ] )
69- const file = new File ( [ fileBlob ] , 'file.png' )
70-
71- // const file = new File([new Blob([await Deno.readFile('./tests/resources/file.png').buffer])], 'file.png')
72-
73- response = await general . upload ( 'string' , 123 , [ 'string in array' ] , file )
67+ let fileArray = new File ( [ await Deno . readFile ( `./tests/resources/file.png` ) ] , "file.png" )
68+ response = await general . upload ( 'string' , 123 , [ 'string in array' ] , fileArray )
7469 // @ts -ignore
7570 console . log ( response . result )
7671
72+
7773 try {
7874 response = await general . error400 ( ) ;
7975 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments