(
&self,
file_name: &str,
contents: &Vec<u8>,
file_path: Option<&str>,
)
| 184 | } |
| 185 | |
| 186 | async fn upload_compressed_object( |
| 187 | &self, |
| 188 | file_name: &str, |
| 189 | contents: &Vec<u8>, |
| 190 | file_path: Option<&str>, |
| 191 | ) -> Result<usize, String> { |
| 192 | let compressed_data = |
| 193 | compress(contents, DEFAULT_COMPRESSION_LEVEL).map_err(err_to_string)?; |
| 194 | let size = compressed_data.len(); |
| 195 | let byte_stream = ByteStream::from(compressed_data); |
| 196 | |
| 197 | match self.upload_object(file_name, byte_stream, file_path).await { |
| 198 | Ok(_) => Ok(size), |
| 199 | Err(err) => Err(format!("Failed to save json file: {}", err)), |
| 200 | } |
| 201 | } |
| 202 | } |
nothing calls this directly
no test coverage detected