mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
20 lines
441 B
JavaScript
20 lines
441 B
JavaScript
|
const storage = require('../../adapters/storage');
|
||
|
|
||
|
module.exports = {
|
||
|
docName: 'files',
|
||
|
upload: {
|
||
|
statusCode: 201,
|
||
|
permissions: false,
|
||
|
async query(frame) {
|
||
|
const filePath = await storage.getStorage('files').save({
|
||
|
name: frame.file.originalname,
|
||
|
path: frame.file.path
|
||
|
});
|
||
|
|
||
|
return {
|
||
|
filePath
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
};
|