ghost-webdav-storage-adapter

    0.4.1 • Public • Published

    WebDAV storage adapter for Ghost

    A WebDAV storage adapter for the Ghost publishing platform 3.x

    npm Version npm Downloads Build Status Dependency Status Open Issues

    Installation

    npm install ghost-webdav-storage-adapter
    mkdir -p ./content/adapters/storage/webdav
    cp -v ./node_modules/ghost-webdav-storage-adapter/dist/*.js ./content/adapters/storage/webdav
     

    Configuration

    Configure the WebDAV storage adapter by adding the following lines to the Ghost config file.

    {
      "storage": {
        "active": "webdav",
        "webdav": {
          "url": "URL_TO_YOUR_WEBDAV_SERVER",
          "username": "YOUR_WEBDAV_USERNAME",
          "password": "YOUR_WEBDAV_PASSWORD",
          "pathPrefix": "YOUR_PATH_PREFIX",
          "storagePathPrefix": "YOUR_STORAGE_PATH_PREFIX"
        }
      }
    }

    NOTE: username, password, pathPrefix and storagePathPrefix are all optional.

    The username and password configuration parameters are used in the Basic Auth access authentication on the WebDAV server.

    Use a pathPrefix if you prefer to limit access to the WebDAV server to a subtree. E.g. with a pathPrefix of /ghost all files will be stored under /ghost and the adapter won't allow access to anything on the WebDAV server outside of /ghost.

    This adapter returns relative URLs for uploaded files. Requests to retrieve the file will be handled by Ghost as if they are stored on a local file system. This requires the returned URLs to start with the same prefix as Ghost's local storage adapter: /content/images. This is the default value for storagePathPrefix but you can provide a different prefix. Don't forget to create a Ghost route that routes requests for the prefix to the images store.

    Via environment variables

    Alternatively, you can configure the WebDAV storage adapter by setting the following environment variables:

    WEBDAV_SERVER_URL
    WEBDAV_USERNAME // optional
    WEBDAV_PASSWORD // optional
    WEBDAV_PATH_PREFIX // optional
    WEBDAV_STORAGE_PATH_PREFIX // optional
    

    Debugging

    To debug the WebDAV storage adapter you can set environment variable DEBUG to webdav so that the adapter will log debug messages to standard out.

    License

    ISC

    Install

    npm i ghost-webdav-storage-adapter

    DownloadsWeekly Downloads

    49

    Version

    0.4.1

    License

    ISC

    Unpacked Size

    29.7 kB

    Total Files

    8

    Last publish

    Collaborators

    • bartt