WordPress.org

Ready to get started?Download WordPress

Forums

CDN Sync Tool
Custom hook (2 posts)

  1. artesea
    Member
    Posted 3 years ago #

    I've got custom plugin used to upload author images on a multi author blog. They are placed in /wp-content/authors/, at the moment I need to manually sync the folder each time a new author is added.
    Is there a hook I can add to the custom plugin to start the sync process / just upload the one image to AWS?

  2. Backie
    Member
    Plugin Contributor

    Posted 3 years ago #

    Well it's very simple to leverage the plugin to upload to the desired CDN using this plugin. I've incuded the php doc comments for the class+method for uploading files.

    /**
      * Starts the upload process for the file.
      *
      * @param string $file The location of the file. If not from the media library, it should be an absolute path.
      * @param boolean $media if true then modifies the file string to add the upload directory before the filename. Otherwise leaves it alone.
      */
    Cst_Sync::process($file,$media);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic