jowilf / sqlalchemy-file

SQLAlchemy-file is a SQLAlchemy extension for attaching files to SQLAlchemy model and uploading them to various storage such as Local Storage, Amazon S3, Rackspace CloudFiles, Google Storage and others using Apache Libcloud.
https://jowilf.github.io/sqlalchemy-file/
MIT License
91 stars 12 forks source link

Allow passing arbitrary extra fields when saving a file #15

Closed ghost closed 1 year ago

ghost commented 1 year ago

This is to support adding extra parameters when uploading files.

The specific use case for this is uploading to S3 with a canned acl.

ghost commented 1 year ago

Thanks for triggering the run, I'll fix that and see if I can get the checks to pass locally before pushing again.

jowilf commented 1 year ago

Hello @jefflieb-wavy, Hope you are doing well. Thank you for your contribution, I'm little bit busy right now, but i'll review your code once i have some free time, Please add an simple example of how it can be used.

Thank you

codecov[bot] commented 1 year ago

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (849204d) compared to base (5ee62a9). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #15 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 24 24 Lines 1755 1756 +1 ========================================= + Hits 1755 1756 +1 ``` | [Impacted Files](https://codecov.io/gh/jowilf/sqlalchemy-file/pull/15?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jocelin+Hounon) | Coverage Δ | | |---|---|---| | [sqlalchemy\_file/file.py](https://codecov.io/gh/jowilf/sqlalchemy-file/pull/15/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jocelin+Hounon#diff-c3FsYWxjaGVteV9maWxlL2ZpbGUucHk=) | `100.00% <100.00%> (ø)` | | | [sqlalchemy\_file/storage.py](https://codecov.io/gh/jowilf/sqlalchemy-file/pull/15/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jocelin+Hounon#diff-c3FsYWxjaGVteV9maWxlL3N0b3JhZ2UucHk=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jocelin+Hounon). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jocelin+Hounon)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

rafnixg commented 1 year ago

Hello, When will this merge be available, or is there another way to add ACLs?

rafnixg commented 1 year ago

Hello @jowilf this implantation seems good to me, the configuration from the fields seems clear and flexible. Thanks for this package.

jowilf commented 1 year ago

Thank you all for your contribution I'll close this PR now. We can continue here -> #18 Please @jefflieb-wavy, to avoid this in future start with a discussion or an issue before PR. Thank you