Add a new pkg/files/images package to handle the image converting
Refactor the main file to consume the new package
Add support to handle: PNG, JPG and GIF mimetypes.
The code under pkg/files may change with the addition of new file types, and it's subject to use the Abstract Factory design pattern to instantiate the right file handler.
Changes
pkg/image
packagepkg/files/images
package to handle the image convertingmain
file to consume the new packagePNG
,JPG
andGIF
mimetypes.The code under
pkg/files
may change with the addition of new file types, and it's subject to use the Abstract Factory design pattern to instantiate the right file handler.