filebrowser-safe icon indicating copy to clipboard operation
filebrowser-safe copied to clipboard

Filebrowser field doesnt work inside editable

Open nirbhasa opened this issue 3 years ago • 0 comments

Issue

I have this model field image = FileField(verbose_name=_("Image"), upload_to="images", format="Image", max_length=255, null=True, blank=True)

  • Uploading images using regular admin works fine
  • When called inside editable, the FileBrowserWidget seems not to be called properly. AddFileBrowser.js is not loaded, and also some attributes of final_attrs are not passed to the custom field template (specifically the id attribute)

I can work around by adding AddFileBrowser.js in the editable_loader template, and adding some js to fill in the id attributes

nirbhasa avatar Apr 08 '22 11:04 nirbhasa