Skip to content

Commit 2a21279

Browse files
committed
fix parse image name with query
1 parent 1803452 commit 2a21279

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Http/Controllers/EditorJsImageUploadController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function ($attribute, $value, $fail) {
8080

8181
$url = $request->input('url');
8282
$imageContents = file_get_contents($url);
83-
$name = substr($url, strrpos($url, '/') + 1);
83+
$name = parse_url(substr($url, strrpos($url, '/') + 1))['path'];
8484
$nameWithPath = config('nova-editor-js.toolSettings.image.path') . '/' . uniqid() . $name;
8585

8686
Storage::disk(config('nova-editor-js.toolSettings.image.disk'))->put($nameWithPath, $imageContents);
@@ -107,7 +107,7 @@ private function applyAlterations($path, $alterations = [])
107107
if (!empty($alterations)) {
108108
$imageSettings = $alterations;
109109
}
110-
110+
111111
if(empty($imageSettings))
112112
return;
113113

0 commit comments

Comments
 (0)