Last active
April 16, 2018 12:47
-
-
Save rossriley/31037198c925ec137014 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This line needs to be called after initialize but before run | |
$app['upload'] = $app->extend( | |
'upload', | |
function ($handler, $app) { | |
if ($app['request']->get('contenttypeslug') && $app['request']->get('id')) { | |
$handler->setPrefix("/".$app['request']->get('contenttypeslug')."/".$app['request']->get('id')); | |
} | |
return $handler; | |
}); |
If I understand this correctly, does this upload the files to a folder named after the content type and then into another with the record id?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
put it in
public/index.php
at this line: https://github.com/bolt/bolt/blob/release/3.1/index.php#L8