-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/media assets manager #38
base: develop
Are you sure you want to change the base?
Conversation
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.
@br4inii good work on this, just some mods here and there and it should be ready to handle uploads
|
||
case do_upload(asset_bucket, filename, binary_data) do | ||
{:ok, _} -> | ||
{:ok, "https://#{asset_bucket}.s3.amazonaws.com/#{asset_bucket}/#{filename}"} |
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.
@br4inii would you mind running mix format on this file to make it easier to read, also please consider constructing the URL
before putting it in the result. Have you tried this on iex? does it give you back a url?
S3.put_object(bucket, file, data) | ||
|> ExAws.request() | ||
end | ||
# pattern match binary to file type |
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.
@br4inii you are going to need to handle more file types than this, if I was you I would work with @CIEspost and find out the minimal list of file types allowed on the platform then pattern match for those, also consider adding a wild card since people may try uploading different kinds of files
Pull Request Test Coverage Report for Build 163
💛 - Coveralls |
Fixes #31
Proposed Changes