open-admin icon indicating copy to clipboard operation
open-admin copied to clipboard

Use Laravel's asset() helper as opposed to PHP's native url()

Open afaulkner-kfs opened this issue 1 year ago • 4 comments

Good afternoon,

I've run into an issue. We serve asset files from an AWS S3 bucket deployed and the Admin facade does not invoke the asset() helper which causes the asset's not to load when accessing the admin portal (ie all asset files are 404'd).

Is it possible to make this change or advise on a clean workaround?

afaulkner-kfs avatar Aug 16 '23 12:08 afaulkner-kfs

Did you add a disk named admin in config/filesystems.php and pointed it to the S3 bucket? If you did, and there is still an issue, this is a bug.

More info: https://open-admin.org/docs/en/model-form-upload#upload-configuration (It reads: 'Cloud uploads are not yet tested with open-admin')

bytebrain avatar Aug 17 '23 13:08 bytebrain

This is not related to the file upload functionality.

This is related to the js/css assets html href / src.

Specically

vendor/open-admin-org/open-admin/src/Admin.php:421

afaulkner-kfs avatar Aug 17 '23 13:08 afaulkner-kfs

Screenshot of the login page which illustrates the issue:

image

afaulkner-kfs avatar Aug 17 '23 13:08 afaulkner-kfs

made a change in the dev branch hope this will help. Not sure since not able to test s3

open-admin-org avatar Nov 08 '23 21:11 open-admin-org