-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allow passing arbitrary extra fields when saving a file #15
Conversation
Thanks for triggering the run, I'll fix that and see if I can get the checks to pass locally before pushing again. |
Hello @jefflieb-wavy, Thank you |
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #15 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 24 24
Lines 1755 1756 +1
=========================================
+ Hits 1755 1756 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Hello, When will this merge be available, or is there another way to add ACLs? |
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.
Thank you for time and your contribution but I think we still need to override the default File class to use your solution, I'm sure we can make it easy
My proposition
- Accept extra in field declaration as default for all associated files
class Attachment(Base):
__tablename__ = "attachment"
id = Column(Integer, autoincrement=True, primary_key=True)
name = Column(String(50), unique=True)
content = Column(FileField(extra={"acl": ..., "meta_data": ...}))
- Accept extra in File to customize for each file
file = File(content="Hello World", filename="hello.txt", content_type="text/plain", extra={"acl": ..., "meta_data": ...})
- Deprecate metadata usage (merge with
extra['meta_data']
)
wdyt ?
Hello @jowilf this implantation seems good to me, the configuration from the fields seems clear and flexible. |
Thank you all for your contribution |
This is to support adding extra parameters when uploading files.
The specific use case for this is uploading to S3 with a canned acl.