Fix for get realPath on IIS.
Sometimes getRealPath is empty when requested on IIS and needs to be rebuilt manually.
This commit is contained in:
parent
8d1ecb01b8
commit
65247c4ce2
|
|
@ -1098,10 +1098,14 @@ class MediaManager extends WidgetBase
|
|||
$path = $quickMode ? '/uploaded-files' : Input::get('path');
|
||||
$path = MediaLibrary::validatePath($path);
|
||||
$filePath = $path.'/'.$fileName;
|
||||
|
||||
|
||||
$realPath = empty(trim($uploadedFile->getRealPath()))
|
||||
? $uploadedFile->getPath() . DIRECTORY_SEPARATOR . $uploadedFile->getFileName()
|
||||
: $uploadedFile->getRealPath();
|
||||
|
||||
MediaLibrary::instance()->put(
|
||||
$filePath,
|
||||
File::get($uploadedFile->getRealPath())
|
||||
File::get($realPath)
|
||||
);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue