LittleKidogo / quick_bytes_system

This is a backend for the Little Kidogo Blog
1 stars 0 forks source link

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

Open zacck-zz opened 6 years ago

zacck-zz commented 6 years ago

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

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 commented 6 years ago

Estimate: Small

r-coh commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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

zacck-zz commented 6 years ago

Hey @CIEspost so like I think @br4inii wants to know what kinds of files will people be allowed to upload to quickbytes. @br4inii we have to be careful some of our team members aren't technical and the language can scare them off even things they are very good at :)

On Tue, Oct 23, 2018 at 8:58 PM Erickson MG notifications@github.com wrote:

@CIEspost https://github.com/CIEspost hey, what file will be handling in the media manager, apart from images...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LittleKidogo/quick_bytes_backend/issues/31#issuecomment-432376176, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2yw7YZs6XI3ERO95K4VUJnBbZwc4Qpks5un2a4gaJpZM4XjwC4 .

-- Regards Isaac Osiemo - Software Developer Skype: zacck.os Tel: +27798259736

CIEspost commented 6 years ago

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 commented 6 years ago

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

r-coh commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

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