bartt / ghost-webdav-storage-adapter Goto Github PK
View Code? Open in Web Editor NEWA WebDAV storage adapter for the Ghost publishing platform
License: Other
A WebDAV storage adapter for the Ghost publishing platform
License: Other
I am trying to use this adapter with OneDrive, but I am struggling with a 401 Unauthorized error. I am able to login fine with WebDav and create folders, etc. using my PC, so my settings are good. I created /ghost-assets/ and also created 2019/09 folders when I thought maybe the adapter wasn't able to create them. Nothing is getting me past it. Is this an issue specific to OneDrive/Webdav?
My config file looks like this:
"storage": {
"active": "webdav",
"webdav": {
"url": "https://d.docs.live.net/my_CID/",
"username": "[email protected]",
"password": "xxxxx",
"pathPrefix": "/ghost-assets/",
"storagePathPrefix": ""
}
}
Did a DEBUG=* ghost run to get the output:
webdav save - /ghost-assets/2019/09 - {"fieldname":"file","originalname":"IMG_5602 - IMG_5605.jpg","encoding":"7bit","mimetype":"image/jpeg","destination":"/tmp","filename":"a3d8d728dabd02e1578c0b6998f 267f2","path":"/tmp/a3d8d728dabd02e1578c0b6998f267f2_processed","size":3516905,"name":"IMG_5602 - IMG_5605.jpg","type":"image/jpeg","ext":".jpg"} +0ms
webdav exists - /ghost-assets/2019/09/IMG_5602---IMG_5605.jpg +1ms
webdav ensureDir_ - /ghost-assets/2019/09 - 2019,09 +11ms
webdav exists - /ghost-assets/2019 +0ms
webdav save - /ghost-assets/2019/09 - {"fieldname":"file","originalname":"IMG_5602 - IMG_5605.jpg","encoding":"7bit","mimetype":"image/jpeg","destination":"/tmp","filename":"a3d8d728dabd02e1578c0b6998f 267f2","path":"/tmp/a3d8d728dabd02e1578c0b6998f267f2","size":3516905,"name":"IMG_5602 - IMG_5605_o.jpg","type":"image/jpeg","ext":".jpg"} +1ms
webdav exists - /ghost-assets/2019/09/IMG_5602---IMG_5605_o.jpg +1ms
webdav ensureDir_ - /ghost-assets/2019/09 - 2019,09 +0ms
webdav exists - /ghost-assets/2019 +0ms
webdav exists - /ghost-assets/2019/09/IMG_5602---IMG_5605.jpg: false +86ms
webdav exists - /ghost-assets/2019/09/IMG_5602---IMG_5605_o.jpg: false +1ms
webdav exists - /ghost-assets/2019: false +3ms
webdav ensureDir_ - /ghost-assets/2019: Error: Invalid response: 401 Unauthorized +68ms
webdav save - /ghost-assets/2019/09 - {"fieldname":"file","originalname":"IMG_5602 - IMG_5605.jpg","encoding":"7bit","mimetype":"image/jpeg","destination":"/tmp","filename":"a3d8d728dabd02e1578c0b6998f 267f2","path":"/tmp/a3d8d728dabd02e1578c0b6998f267f2_processed","size":3516905,"name":"IMG_5602 - IMG_5605.jpg","type":"image/jpeg","ext":".jpg"}: Error: Invalid response: 401 Unauthorized +0ms
express:router : /ghost/api/canary/admin/images/upload/ +400ms
express:router : /ghost/api/canary/admin/images/upload/ +1ms
ghost:error-handler Error: Invalid response: 401 Unauthorized
ghost:error-handler at handleResponseCode (/var/www/ghost/versions/2.31.0/node_modules/webdav/dist/response.js:7:15)
ghost:error-handler at tryCatcher (/var/www/ghost/versions/2.31.0/node_modules/bluebird/js/release/util.js:16:23)
ghost:error-handler at Promise._settlePromiseFromHandler (/var/www/ghost/versions/2.31.0/node_modules/bluebird/js/release/promise.js:517:31)
ghost:error-handler at Promise._settlePromise (/var/www/ghost/versions/2.31.0/node_modules/bluebird/js/release/promise.js:574:18)
ghost:error-handler at Promise._settlePromise0 (/var/www/ghost/versions/2.31.0/node_modules/bluebird/js/release/promise.js:619:10)
ghost:error-handler at Promise._settlePromises (/var/www/ghost/versions/2.31.0/node_modules/bluebird/js/release/promise.js:699:18)
ghost:error-handler at _drainQueueStep (/var/www/ghost/versions/2.31.0/node_modules/bluebird/js/release/async.js:138:12)
ghost:error-handler at _drainQueue (/var/www/ghost/versions/2.31.0/node_modules/bluebird/js/release/async.js:131:9)
ghost:error-handler at Async._drainQueues (/var/www/ghost/versions/2.31.0/node_modules/bluebird/js/release/async.js:147:5)
ghost:error-handler at Immediate.Async.drainQueues [as _onImmediate] (/var/www/ghost/versions/2.31.0/node_modules/bluebird/js/release/async.js:17:14)
ghost:error-handler at runCallback (timers.js:705:18)
ghost:error-handler at tryOnImmediate (timers.js:676:5)
ghost:error-handler at processImmediate (timers.js:658:5)
ghost:error-handler at process.topLevelDomainCallback (domain.js:126:23) +0ms
express:router : /ghost/api/canary/admin/images/upload/ +1ms
compression no compression: size below threshold +4s
[2019-09-20 03:46:01] ERROR "POST /ghost/api/canary/admin/images/upload/" 500 407ms
Invalid response: 401 Unauthorized
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.