Open
Conversation
zacck-zz
requested changes
Oct 21, 2018
Member
zacck-zz
left a comment
There was a problem hiding this comment.
@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}"} |
Member
There was a problem hiding this comment.
@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 |
Member
There was a problem hiding this comment.
@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 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #31
Proposed Changes