Ghost/core/server/adapters/storage/index.js
Naz 5242566252 Added local media storage adapter
refs https://linear.app/tryghost/issue/CORE-121/create-a-video-storage-adapter

- This is an experimental implementation of video file upload support (audio is yet to follow)
- The storage adapter still needs more thinking as it's almost the same as the "LocalStorgeAdapter" that stores images.
- Also the output serializer skipped use of url utils in favor of inline implementatoin - this should almost certainly be it's own package
2021-11-03 00:33:28 +13:00

18 lines
465 B
JavaScript

const adapterManager = require('../../services/adapter-manager');
/**
* @param {'images'|'media'|'files'} [feature] - name for the "feature" to enable through adapter, e.g.: images or media storage
* @returns {Object} adapter instance
*/
function getStorage(feature) {
let adapterName = 'storage';
if (feature) {
adapterName += `:${feature}`;
}
return adapterManager.getAdapter(adapterName);
}
module.exports.getStorage = getStorage;