Skip to content
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

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Conversation

r-coh
Copy link
Contributor

@r-coh r-coh commented Oct 21, 2018

Fixes #31

Proposed Changes

  • initial setup of the media manager

Copy link
Member

@zacck-zz zacck-zz left a 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}"}
Copy link
Member

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
Copy link
Member

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

@coveralls
Copy link

Pull Request Test Coverage Report for Build 163

  • 0 of 9 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-7.3%) to 75.728%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/qb_backend/media_assets_manager/media_assets_manager.ex 0 9 0.0%
Totals Coverage Status
Change from base Build 152: -7.3%
Covered Lines: 78
Relevant Lines: 103

💛 - Coveralls

@r-coh r-coh requested a review from WanjikuMac October 25, 2018 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants