mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 06:12:03 +03:00
7b761a8751
no issue Adds new canary api endpoint, currently replicating v2 endpoint but paving way for future updates to new version
20 lines
481 B
JavaScript
20 lines
481 B
JavaScript
const storage = require('../../adapters/storage');
|
|
|
|
module.exports = {
|
|
docName: 'images',
|
|
upload: {
|
|
statusCode: 201,
|
|
permissions: false,
|
|
query(frame) {
|
|
const store = storage.getStorage();
|
|
|
|
if (frame.files) {
|
|
return Promise
|
|
.map(frame.files, file => store.save(file))
|
|
.then(paths => paths[0]);
|
|
}
|
|
return store.save(frame.file);
|
|
}
|
|
}
|
|
};
|