mohamedsabil83 / filament-forms-tinyeditor

A TinyMce Editor component for filament
MIT License
164 stars 37 forks source link

[Bug]: Image saved in db doesn't work while edit works #113

Closed mateo-it closed 7 months ago

mateo-it commented 7 months ago

What happened?

I'm trying to upload image using: TinyEditor::make('content') ->fileAttachmentsDisk('local') ->fileAttachmentsVisibility('public') ->fileAttachmentsDirectory('public')

Path saved in db is: ../../storage/ while it needs to be either /storage or ../../../storage. I'm using Laravel 10 and filament v3.

Is this expected, or I need to adjust path before saving in database? P.S. When using edit feature, it correctly uploads and saves as : ../../../storage.

Thank you!

How to reproduce the bug

When I upload image in tinymce text editor it saves wrong path in database, while on edit works as expected.

Package Version

2.1

PHP Version

8.2

Laravel Version

10

Which operating systems does with happen with?

Windows

Notes

No response

mohamedsabil83 commented 7 months ago

Try change relativeUrls / convertUrls. It may work for you.

mateo-it commented 7 months ago

Try change relativeUrls / convertUrls. It may work for you.

Thanks! It works when I set relative urls to false.

Thank you!

mohamedsabil83 commented 7 months ago

You're welcome

muath-ye commented 6 months ago

Try change relativeUrls / convertUrls. It may work for you.

Thank you it worked for by adding ->setConvertUrls(false) to the component

mohamedsabil83 commented 6 months ago

You're welcome