private function processCustomUploadHandler(Request $request, array $handler)
{
list($namespace, $prefix) = $this->parser($handler[0]);
$this->app['upload.namespace'] = $namespace;
$this->app['upload.prefix'] = $prefix;
// Do the upload
$fullResult = $this->handleUploadFiles($request, $namespace);
array_shift($handler);
$original = $namespace;
if (count($fullResult)) {
$result = $fullResult[0];
foreach ($handler as $copy) {
list($namespace, $prefix) = $this->parser($copy);
$this->filesystem()->put($namespace . '://' . $prefix . basename($result['name']), $this->filesystem()->read($original . '://' . $result['name']));
}
}
return $this->json($fullResult, Response::HTTP_OK, ['Content-Type' => 'text/plain']);
}