-
Notifications
You must be signed in to change notification settings - Fork 48
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
s3 uploads #543 #659
base: develop
Are you sure you want to change the base?
s3 uploads #543 #659
Conversation
Awesome, great job! I'll take a closer look tomorrow :) |
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.
Thanks for the PR! Looking good mostly :)
left some comments, curious to hear your thougts.
@joepio This should be ready for another look. |
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.
Looking good! One more general point maybe: Could you add some documentation and tests? I'd accept a PR without them if you had enough of this.
Especially one happy flow for FileStore in tests would be nice.
Just tests and documentation left. Should be able to finish this up on Friday. |
Alright @joepio this is ready for another look. Tests are passing and functionality tested with small and large files. |
Great job! Only thing I still have left is authentication. |
You can init OpenDal via both struct+builder or hashmap, passing region and endpoint:
But honestly, I don't see anything wrong with the current auth, @joepio. What's your take on it? I believe Keypair allow to work with both private and public. |
Late to the party, but personally, I would prefer to remove this parameter:
It's the job of the atomic server to decide if the file or any other resource is public or visible to the group. Storage is always private with a key/secret pair; if people want to share their s3 bucket as a public website, they have another way of doing it. |
This flag is unrelated to this PR / S3, it's for regular authorization checks. |
e83a734
to
c1ade8c
Compare
added s3 config vars s3 uploads working prefix file-id with store type cargo format download building download working possibly fix issue with : refactor files logic into files module static str lovelies clean up log changelog and readme updates use tokio streams in upload check bucket exists before unwrap Store config in FileStore cargo fmt consolidate download fs path logic move file stores to appstate no unwrap refactor finish refactor tests passing back to nicer interface documentation move test to tests.rs readme and dep fix
07d9f0a
to
7c6bda1
Compare
For some reason when I refresh a file, it gives me a 404. When I press retry, it works. I'll try to find out what's going on. |
I think my 404 issue has to do with the URL encoding. The first part in @metame do you remember what the encoding was needed for? Sorry I only find out about this so long after you opened this PR! |
So the main reason we implemented the file prefix was to support backwards compatibility among file systems. That is, if an atomic server instance had files uploaded to the server directly and then turned on s3 support, the existing files would still work. I've found the source of this bug, but the fix has some drawbacks. Specifically, it requires url-encoding the subject path for every resource that goes through |
PR Checklist:
Open issues: