forked from sagi/seepur
16 lines
329 B
JavaScript
16 lines
329 B
JavaScript
'use strict'
|
|
const FileUtils = use('App/Utils/FileUtils');
|
|
|
|
class CdnController {
|
|
async publicImages({request, response}) {
|
|
const file = await FileUtils.getFile(request.params.fileName);
|
|
if (file)
|
|
response.send(file);
|
|
else
|
|
return {
|
|
ERROR: 'no file'
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = CdnController
|