tikiatua / internal-assets-plugin

A simple plugin for Craft CMS to allow for private assets
MIT License
33 stars 8 forks source link

Craft 4 backend asset links #25

Closed playcraftSystems closed 1 year ago

playcraftSystems commented 1 year ago

Hello,

Any internal assets are injecting "/admin" into the url string if accessed from the backend.

Example: If there was an asset called foo.png and it was an internal asset It could be accessed normally on the front end and the url would be https://bar.com/internal/bar/foo.png But if you try to open the asset from the backend links such as "View" or click the url globe icon the url is https://bar.com/admin/internal/bar/foo.png. This returns page not found. Think you can help?

tikiatua commented 1 year ago

Hi @playcraftSystems

Thank you for your message. I cannot really reproduce the issue. In my control panel, there is no admin prefix in the paths for the globe icon and the view links (tested on Craft 4.4.0 and 4.4.5).

Are you already on Craft 4.4? If this is the case, then there might be an issue with the path definition. Maybe you can post the configuration of your filesystem (see mine below).

Bildschirm­foto 2023-03-22 um 23 37 14
playcraftSystems commented 1 year ago

Thanks for the reply. I made a mistake by not including the forward slash at the beginning Base URL string. There is no issue.