-
Notifications
You must be signed in to change notification settings - Fork 35
feat: Update FileImageLoader to be used in shared drive ✨ #2828
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the
file
is anio.cozy.files
object, where thedriveId
comes from ? It is not documented https://docs.cozy.io/cozy-doctypes/io.cozy.files.html 🤔 And I don't remember we have such attr on it.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, did you test this to check if it works @lethemanh ? If I remember well, shared drive id comes from io.cozy.sharing and not io.cozy.files. Same for cozy/cozy-libs#2805 ?
About documentation, shared drives are still a work in progress on back side, so doctype documentation can be incomplete. But it will need to be completed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the request with
driveId
will send to this APIsharings/drives/:driveId/downloads?Id=...&Filename=...
and it's not working at this moment. This is the errorThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that we have driveId on files https://github.com/cozy/cozy-stack/pull/4511/files & cozy/cozy-client#1604
So yeah doctype documentation needs to be updated once the stack PR is merged.
and yes
sharings/drives/:driveId/downloads?
seems to not have been implemented yet https://github.com/cozy/cozy-stack/pull/4511/files#diff-4ade94bc84a0d258576e850dcc6d9a18a5be2781ddb37103a3b2e910a550cf6fR322There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh you are right. @taratatach is it possible implement this route also to download versions of a file ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This route has been implemented in cozy/cozy-stack@4e4c45e. Do you need something else?