Add (untested!) WebDAV support

This commit is contained in:
Hippo 2019-09-26 18:08:10 +05:30
parent 6d41e9ac2f
commit 142faa7fe3
4 changed files with 35 additions and 4 deletions

View file

@ -36,6 +36,22 @@
"S3_ASSET_HOST_URL": {
"description": "Optional custom CDN asset host url, if using S3 file storage.",
"required": false
}
},
"WEBDAV_SERVER_URL": {
"description": "URL of your WebDAV server, if using WebDAV file storage",
"required": false
},
"WEBDAV_USERNAME": {
"description": "Username for your WebDAV server, if using WebDAV file storage",
"required": false
},
"WEBDAV_PATH_PREFIX": {
"description": "Optional path prefix for your WebDAV server, if using WebDAV file storage",
"required": false
},
"WEBDAV_STORAGE_PATH_PREFIX": {
"description": "Optional storage path prefix for your WebDAV server, if using WebDAV file storage",
"required": false
},
}
}

View file

@ -12,3 +12,5 @@ for theme in "${themes[@]}"
do
cp -Rf "node_modules/$theme" content/themes
done
ln -s ../../../node_modules/ghost-webdav-storage-adapter/dist content/adapters/storage/webdav

View file

@ -23,6 +23,18 @@ function createConfig() {
assetHost: process.env.S3_ASSET_HOST_URL
}
}
} else if (!!process.env.WEBDAV_SERVER_URL){
fileStorage = true
storage = {
'active': 'webdav',
'webdav': {
'url': process.env.WEBDAV_SERVER_URL,
'username': process.env.WEBDAV_USERNAME,
'password': process.env.WEBDAV_PASSWORD,
'pathPrefix': process.env.WEBDAV_PATH_PREFIX,
'storagePathPrefix': process.env.WEBDAV_STORAGE_PATH_PREFIX
}
}
} else if (!!process.env.BUCKETEER_AWS_ACCESS_KEY_ID) {
fileStorage = true
storage = {

View file

@ -10,15 +10,16 @@
"private": true,
"version": "2.27.0",
"dependencies": {
"attila": "github:zutrinken/attila#1.13.0",
"bleak": "github:zutrinken/bleak#1.4.0",
"casper": "github:tryghost/Casper#2.10.6",
"ghost": "2.27.0",
"ghost-storage-adapter-s3": "^2.8.0",
"ghost-storage-cloudinary": "^1.1.4",
"mysql": "^2.17.1",
"attila": "github:zutrinken/attila#1.13.0",
"ghost-webdav-storage-adapter": "^0.3.5",
"london": "github:tryghost/london#1.0.0",
"massively": "github:tryghost/massively#1.0.2",
"bleak": "github:zutrinken/bleak#1.4.0",
"mysql": "^2.17.1",
"the-shell": "github:mityalebedev/The-Shell#v2.0.0",
"vapor": "github:sethlilly/Vapor#v1.6.0"
},