Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Refactor - Cleanup of Controller et all #3

Open
cdowdy opened this issue Apr 7, 2017 · 0 comments
Open

Refactor - Cleanup of Controller et all #3

cdowdy opened this issue Apr 7, 2017 · 0 comments

Comments

@cdowdy
Copy link
Owner

cdowdy commented Apr 7, 2017

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:

  • move the directory logic into a class or method. IE this stuff:
if ( $directory == 'index' ) {
  $fileList = $filesystem->listContents( null, false );
} else {
    $fileList = $filesystem->listContents( $directory, false );
}  

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

cdowdy added a commit that referenced this issue Sep 20, 2017
* add tinypngoptimize handler for new service provider

* adds new service provider

* registers new service provider

* removes dead code and uses service provider for #3
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant