Skip to content

feat(services/aliyun_drive): Add operation in http context #6063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/src/services/aliyun_drive/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,9 @@ impl Access for AliyunDriveBackend {
serde_json::from_reader(res.reader()).map_err(new_json_serialize_error)?;

let download_url = self.core.get_download_url(&file.file_id).await?;
// TODO: this request should be done in core.rs and not here
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left this TODO since I think we should refactor this and this request needs to be in core.rs. get_download_url should be renamed to something like download_file that both gets the download url & downloads it in the same function, right?

Should I refactor that in this PR? or leave the TODO?

Copy link
Contributor Author

@jorgehermo9 jorgehermo9 Apr 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update this PR once #6089 is merge

let req = Request::get(&download_url)
.extension(Operation::Read)
.header(header::RANGE, args.range().to_header())
.body(Buffer::new())
.map_err(new_request_build_error)?;
Expand Down
Loading