Thanks to visit codestin.com
Credit goes to github.com

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

Refactor - Cleanup of Controller et all #3

@cdowdy

Description

@cdowdy

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions