public function UploadController::handleUploads in Plupload integration 8
Same name and namespace in other branches
- 2.0.x src/UploadController.php \Drupal\plupload\UploadController::handleUploads()
Handles Plupload uploads.
1 string reference to 'UploadController::handleUploads'
File
- src/
UploadController.php, line 80
Class
- UploadController
- Plupload upload handling route.
Namespace
Drupal\pluploadCode
public function handleUploads() {
// @todo: Implement file_validate_size();
try {
$this
->prepareTemporaryUploadDestination();
$this
->handleUpload();
} catch (UploadException $e) {
return $e
->getErrorResponse();
}
// Return JSON-RPC response.
return new JsonResponse([
'jsonrpc' => '2.0',
'result' => NULL,
'id' => 'id',
], 200);
}