Skip to content

Commit 8184fbd

Browse files
committed
IMPROVEMENTS
change back media manager directory structure when producing different sizes
1 parent 5033904 commit 8184fbd

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

src/Darryldecode/Backend/Base/Registrar/Registrar.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Registrar {
1313
/**
1414
* the laravel backend version
1515
*/
16-
const VERSION = '1.0.27';
16+
const VERSION = '1.0.28';
1717
const VERSION_NAME = 'Alpha';
1818

1919
/**

src/Darryldecode/Backend/Components/MediaManager/Commands/UploadCommand.php

+1-8
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,11 @@ public function handle(Repository $config,Image $image,Filesystem $filesystem)
8181
{
8282
foreach($sizes as $key => $dimension)
8383
{
84-
$targetDir = $this->getCurrentFullPath($config,$path).$key.DIRECTORY_SEPARATOR;
85-
86-
if( ! $filesystem->exists($targetDir) )
87-
{
88-
$filesystem->makeDirectory($this->normalizePath($path).DIRECTORY_SEPARATOR.$key.DIRECTORY_SEPARATOR);
89-
}
90-
9184
$image::createThumbnail(
9285
$filePath,
9386
$dimension[0],
9487
$dimension[1],
95-
$targetDir.$file_name.'.'.$extension
88+
$this->getCurrentFullPath($config,$path).DIRECTORY_SEPARATOR.$this->produceThumbFileName($file_name,$key,$extension)
9689
);
9790
}
9891
}

src/Darryldecode/Backend/Components/MediaManager/Views/mediaManager.blade.php

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
</div>
5959
<div data-ng-repeat="f in files.files" class="col-lg-2 col-md-2 col-sm-4">
6060
<div class="file-thumb">
61+
<label class="label label-info pull-left label-file-size">Size: @{{::getSizeName(f)}}</label>
6162
<file-preview file-source="@{{f}}"></file-preview>
6263
<div class="text-wrap meta-data-holder trim-info-xs">
6364
<a href="" data-toggle="tooltip" data-placement="bottom" title="@{{f}}" class="file-name">@{{::getLastSegment(f)}}</a>

0 commit comments

Comments
 (0)