mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
5242566252
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
18 lines
465 B
JavaScript
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;
|