Create multiple assets concurrently #5
@ -302,9 +302,13 @@ impl CloudContext{
|
|||||||
|
|
||||||
let request_config=serde_json::to_string(&config).map_err(CreateError::SerializeError)?;
|
let request_config=serde_json::to_string(&config).map_err(CreateError::SerializeError)?;
|
||||||
|
|
||||||
|
let part=reqwest::multipart::Part::bytes(body)
|
||||||
|
//you must have a file name or roblox will 400!!!!!!!!!
|
||||||
|
.file_name("image");
|
||||||
|
|
||||||
let form=reqwest::multipart::Form::new()
|
let form=reqwest::multipart::Form::new()
|
||||||
.text("request",request_config)
|
.text("request",request_config)
|
||||||
.part("fileContent",reqwest::multipart::Part::bytes(body));
|
.part("fileContent",part);
|
||||||
|
|
||||||
self.post_form(url,form).await.map_err(CreateError::Reqwest)?
|
self.post_form(url,form).await.map_err(CreateError::Reqwest)?
|
||||||
.error_for_status().map_err(CreateError::Reqwest)?
|
.error_for_status().map_err(CreateError::Reqwest)?
|
||||||
|
Loading…
Reference in New Issue
Block a user