Although I have use the storeOriginalName(), it keep store 'uploaded_file.jpg' as filename. How to store the original filename?
And another issue is with the same configuration, when edit the resource (Edit Form), it didn't display the stored image. It only able to display stored image in details screen. Is it a correct behaviour?
Here is my code (same as sample in the readme.md):
ImageCropper::make('Photo')
->disk('public')
->prunable()
->storeOriginalName('photo_name')
->storeSize('photo_size')
->preview(function () {
if (!$this->value) {
return null;
}
$url = Storage::disk($this->disk)->url($this->value);
$filetype = pathinfo($url)['extension'];
return 'data:image/' . $filetype . ';base64,' . base64_encode(file_get_contents($url));
})
->aspectRatio(16/9),
Although I have use the storeOriginalName(), it keep store 'uploaded_file.jpg' as filename. How to store the original filename?
And another issue is with the same configuration, when edit the resource (Edit Form), it didn't display the stored image. It only able to display stored image in details screen. Is it a correct behaviour?