You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I plan to run the web app on an IIS in a subfolder https://example.com/Piranha. When I run the project in Visual Studio, the application runs directly in root https://localhost:7645.
Now I have the problem that the images from the media library are not displayed on both systems at the same time. In the settings I found the field "Media CDN". If I set that, it works on the IIS, but not locally anymore. If I remove it, it works locally and not on the IIS. I am using the same database for local development and the staging server.
I found the issue #1658, but it does not deal with the media library. Is there an easy way to set the Media CDN to only use it when the HTTP request is not local? Is there a better solution?
The text was updated successfully, but these errors were encountered:
The media CDN is not intended to be used like this, the idea with the CDN setting is if you want to upload images to one location (filesystem, storage) but want to fetch them when rendering the UI from a different URL. The issue would rather be related to that the application path when running in a subdirectory is not considered when generating local file system URL:s.
tidyui
changed the title
Media CDN local and on IIS Subdirectory
Media url not correct when using FileStorage in a subdirectory.
Sep 29, 2022
I know it's been a while, but I'm having a hard time seeing why this wouldn't work in you case @darkson95. The PublicUrl property for a local asset is calculated to something like:
~/uploads/<id>/<filename>
Given that ~/ should be evaluated to your application root in ASP.NET, if used correctly in the website rendering the image the url should be correct both when the application is running in the root and in an application folder.
Hello,
first of all thank you for the project!
I plan to run the web app on an IIS in a subfolder
https://example.com/Piranha
. When I run the project in Visual Studio, the application runs directly in roothttps://localhost:7645
.Now I have the problem that the images from the media library are not displayed on both systems at the same time. In the settings I found the field "Media CDN". If I set that, it works on the IIS, but not locally anymore. If I remove it, it works locally and not on the IIS. I am using the same database for local development and the staging server.
I found the issue #1658, but it does not deal with the media library. Is there an easy way to set the Media CDN to only use it when the HTTP request is not local? Is there a better solution?
The text was updated successfully, but these errors were encountered: