Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@juanfvasquez
Last active December 3, 2017 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanfvasquez/be8b4cbacf2c99e1264552eabae78045 to your computer and use it in GitHub Desktop.
Save juanfvasquez/be8b4cbacf2c99e1264552eabae78045 to your computer and use it in GitHub Desktop.
Route File
'use strict'
const Route = use('Route')
const Helpers = use('Helpers')
Route.resource('/companies', 'CompanyController')
Route.get('/companies/:company', function (request, response) {
response.download(Helpers.storagePath('img/companies/' + request.param('company')))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment