File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
src/file-explorer-ui/src/api Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -36,23 +36,14 @@ impl Api {
3636 let reader = gloo_file:: futures:: read_as_bytes ( & file. into ( ) ) . await ?;
3737
3838 let url = self . base_url . join ( "api/v1" ) ?;
39- let _response = Client :: new ( )
39+
40+ Client :: new ( )
4041 . post ( url. as_ref ( ) )
4142 . header ( "Content-Type" , "application/octet-stream" )
4243 . header ( "X-File-Name" , file_name)
4344 . body ( reader)
4445 . send ( )
4546 . await ?;
46- // let form_data = FormData::new()
47- // .map_err(|err| Error::msg(format!("Failed to create FormData: {:?}", err)))?;
48- // form_data
49- // .append_with_blob("file", &file)
50- // .map_err(|err| Error::msg(format!("Failed to append file to FormData: {:?}", err)))?;
51-
52- // gloo::net::http::Request::post(url.as_ref())
53- // .body(form_data)?
54- // .send()
55- // .await?;
5647
5748 Ok ( ( ) )
5849 }
You can’t perform that action at this time.
0 commit comments