private static function FlmngrServer::reqFileResize in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7
1 call to FlmngrServer::reqFileResize()
- FlmngrServer::flmngrRequest in vendor/
edsdk/ flmngr-server-php/ src/ FlmngrServer.php
File
- vendor/
edsdk/ flmngr-server-php/ src/ FlmngrServer.php, line 280
Class
Namespace
EdSDK\FlmngrServerCode
private static function reqFileResize($config) {
$filePath = $_POST['f'];
$newFileNameWithoutExt = $_POST['n'];
$maxWidth = $_POST['mw'];
$maxHeight = $_POST['mh'];
$mode = $_POST['mode'];
try {
$fileSystem = new FMDiskFileSystem($config);
$resizedFilePath = $fileSystem
->resizeFile($filePath, $newFileNameWithoutExt, $maxWidth, $maxHeight, $mode);
return new Response(NULL, $resizedFilePath);
} catch (MessageException $e) {
return new Response($e
->getFailMessage(), NULL);
}
}