From f072cbf1f81d3da0bccd0e5d776dc5fc7b51d855 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 16 Aug 2024 14:28:03 -0700 Subject: [PATCH] asset create requires a non-empty string for file name that is thrown away (undocumented) --- rbx_asset/src/cloud.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rbx_asset/src/cloud.rs b/rbx_asset/src/cloud.rs index adede95..a14ee6c 100644 --- a/rbx_asset/src/cloud.rs +++ b/rbx_asset/src/cloud.rs @@ -302,9 +302,13 @@ impl CloudContext{ 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() .text("request",request_config) - .part("fileContent",reqwest::multipart::Part::bytes(body)); + .part("fileContent",part); self.post_form(url,form).await.map_err(CreateError::Reqwest)? .error_for_status().map_err(CreateError::Reqwest)?