cdowdy / bolt-tinypng

Bolt Extension Using TinyPNG API to optimize images
7 stars 2 forks source link

Refactor - Cleanup of Controller et all #3

Open cdowdy opened 7 years ago

cdowdy commented 7 years ago

Now that I have the base functionality that I'd use/want I need to refactor this code so its easier to maintain / update and add.

right now I'd like to with time permitting to:

if ( $directory == 'index' ) { $newImagePath = $filesPath . '/' . $newImageName; } else { $newImagePath = $filesPath . '/' . $directory . '/' . $newImageName; }

if ( $directory == 'index' ) { $uploadDir = ''; } else { $uploadDir = $directory . '/'; }



* move the flysytem stuff into its own class so we can easily reuse it "more better"

* ~~add optimized, optimized renamed, and uploaded files to the file list from the json response retrieved from the ajax endpoint~~ 
*~~add option to delete a directory~~ 
* ~~add option to copy/clone an image~~ 
* add metadata preservation options to the image upload

~~with time permitting move to a service~~

~~clean up templates - they are currently a mess and I know what they do since I built them :) haha~~