Skip to content

Commit

Permalink
Merge pull request #316 from awcodes/fix/cloud-curation
Browse files Browse the repository at this point in the history
Fix: curation path when using cloud disks
  • Loading branch information
awcodes authored Sep 29, 2023
2 parents 16dc13e + 2570b9c commit 9b99396
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Components/Modals/CuratorCuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ class CuratorCuration extends Component

public function saveCuration($data = null): void
{
$image = Image::make(Storage::disk($this->media->disk)->path($this->media->path));
if (in_array($this->media->disk, config('curator.cloud_disks'))) {
$filePath = Storage::disk($this->media->disk)->url($this->media->path);
} else {
$filePath = Storage::disk($this->media->disk)->path($this->media->path);
}

$image = Image::make($filePath);
$extension = $data['format'] ?? $image->extension;

$aspectWidth = floor(($data['canvasData']['width'] / $data['canvasData']['naturalWidth']) * $data['width']);
Expand Down

0 comments on commit 9b99396

Please sign in to comment.