(
&self,
file_name: &str,
contents: &Vec<u8>,
file_path: Option<&str>,
)
| 148 | } |
| 149 | |
| 150 | async fn upload_compressed_object( |
| 151 | &self, |
| 152 | file_name: &str, |
| 153 | contents: &Vec<u8>, |
| 154 | file_path: Option<&str>, |
| 155 | ) -> Result<usize, String> { |
| 156 | let compressed_data = |
| 157 | compress(contents, DEFAULT_COMPRESSION_LEVEL).map_err(err_to_string)?; |
| 158 | let size = compressed_data.len(); |
| 159 | |
| 160 | match self |
| 161 | .upload_object(file_name, compressed_data, file_path) |
| 162 | .await |
| 163 | { |
| 164 | Ok(_) => Ok(size), |
| 165 | Err(err) => Err(format!("Failed to save json file: {}", err)), |
| 166 | } |
| 167 | } |
| 168 | } |
nothing calls this directly
no test coverage detected