yunchipang commented on code in PR #6673:
URL: https://github.com/apache/opendal/pull/6673#discussion_r2433511763
##########
core/src/services/dropbox/writer.rs:
##########
@@ -34,6 +35,32 @@ impl DropboxWriter {
pub fn new(core: Arc<DropboxCore>, op: OpWrite, path: String) -> Self {
DropboxWriter { core, op, path }
}
+
+ fn parse_metadata(decoded_response: DropboxMetadataResponse) ->
Result<Metadata> {
+ let mut metadata = Metadata::default();
+
+ if let Some(size) = decoded_response.size {
+ metadata.set_content_length(size);
+ }
+
+ if let Some(content_hash) = decoded_response.content_hash {
+ metadata.set_etag(&content_hash);
+ }
+
+ if let Some(rev) = decoded_response.rev {
+ metadata.set_version(&rev);
+ }
+
+ if let Some(server_modified) = decoded_response.server_modified {
+ let date_utc = server_modified.parse::<Timestamp>()?;
+ metadata.set_last_modified(date_utc);
+ } else {
Review Comment:
prefer `server_modified` over `client_modified` for `last_modified`
timestamp. not sure if this is desired tho. please advise!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]