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

Build a Media Manager to hold Media Assets Used in the Blogs #31

Open
1 task done
zacck-zz opened this issue Oct 17, 2018 · 10 comments
Open
1 task done

Build a Media Manager to hold Media Assets Used in the Blogs #31

zacck-zz opened this issue Oct 17, 2018 · 10 comments
Assignees

Comments

@zacck-zz
Copy link
Member

zacck-zz commented Oct 17, 2018

Expected Behavior

The Knowledgebase is bound to become a holding area for many more kinds of Media Assets since whenever we are trying to store education we have to store it in the medium that was available for the recorder. In order to enable this in addition to keeping our text documents in the database, we should develop a Media Manager to enable us to store Media Assets Used in the Blog

How to Achieve this

  • Build a Media Asset Store that uploads a file to amazon s3 and returns its url

Actual Behavior

N/A

Acceptance Criteria

As a user, I should be able to upload images that will be stored as links and attached to blogs

@r-coh
Copy link
Contributor

r-coh commented Oct 17, 2018

Estimate: Small

@r-coh r-coh self-assigned this Oct 17, 2018
@r-coh
Copy link
Contributor

r-coh commented Oct 18, 2018

https://medium.com/founders-coders/image-uploads-with-aws-s3-elixir-phoenix-ex-aws-step-1-f6ed1c918f14 is this enough to finish this issue?? @zacck @WanjikuMac

@zacck-zz
Copy link
Member Author

zacck-zz commented Oct 19, 2018

@br4inii yes very true, in fact, I used the very same link when learning about this I will create and share the buckets and keys you need.
However when pattern matching the binary into a file you will likely need to look here
https://www.garykessler.net/library/file_sigs.html
Since in QB we will have to handle more than just .jpg and .png
also see here for a more direct example

https://dockyard.com/blog/2017/08/22/building-an-image-upload-api-with-phoenix

@r-coh
Copy link
Contributor

r-coh commented Oct 23, 2018

@CIEspost hey, what file will be handling in the media manager, apart from images...

@zacck-zz
Copy link
Member Author

zacck-zz commented Oct 23, 2018 via email

@CIEspost
Copy link
Member

hey @br4inii we will be uploading JPG files, PNG files, SVG files, GIFs, .webm video files,
.KEYNOTE and .pptx (both presentation slide file formats) - hope this helps?

@r-coh
Copy link
Contributor

r-coh commented Oct 24, 2018

@zacck thats noted, thanks for elaborating.
@CIEspost nice, this helps big time!! Thanks!!

@r-coh
Copy link
Contributor

r-coh commented Oct 24, 2018

@zacck the SVG and KEYNOTE file types don't seem to have a specific hex signature, am thinking they are types of image and presentation files respectively, in which case when they are uploaded and their binary format matches one of the ones we've defined, will the system change the .extension of the file to what we currently have or they probably have a different hex signature which in this case might be ignored by our system. Any thoughts on this?

@zacck-zz
Copy link
Member Author

@br4inii gonna look into this with you later please remind me tomorrow morning so we can figure something out, for now handle the file types you can.
Also I think since this is becoming a lot you probably want to change that image_extension to file_extension and then make it public and add tests to ensure that it detects binaries correctly I am sure you can find sample binaries online or even make a few that start with the signature but have bogus data

@r-coh
Copy link
Contributor

r-coh commented Oct 24, 2018

@zacck okay, i've done most of that already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants