Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect bugged image path when using /assets as upload path #78

Open
Joshuab1997 opened this issue Oct 29, 2020 · 2 comments
Open

Incorrect bugged image path when using /assets as upload path #78

Joshuab1997 opened this issue Oct 29, 2020 · 2 comments

Comments

@Joshuab1997
Copy link

Joshuab1997 commented Oct 29, 2020

Hi,

Recently in our project, we changed the way our images are uploaded. Previously, we uploaded it in /public/img, which didn't cause any problems. Now, we try to upload images in /assets/img/website, but this causes a big issue.

First of all, this is how the config we use looks like:

default:
dir: "../assets/img/website"
type: image

However, when I try to upload a file, the following happens:

image

Our path is incorrect as it should be /img/website (or at least /assets/img/website) instead of /manager/file, and the questionmark shouldn't be there.

I've tried the demo bundle and it has the exact same issue. This issue only occurs when using assets instead of public, but we have to save images in our assets since they shouldn't be available through filename directly.

@artgris
Copy link
Owner

artgris commented Oct 30, 2020

Hi, your configuration folder is not in the "public" folder so it has no public access (via /assets/img/website/randomimg.jpg url), filemanager then uses access to private files (with /manager/file/..?conf=default url to access it)

if you want /assets/img/website/randomimg.jpg url, put your assets folder in public and used "../public/assets/img/website" as conf

@Joshuab1997
Copy link
Author

Oh okay, I see, the thing is all the images that are uploaded shouldn't be directly possible. Doesn't the uploading happen in PHP and shouldn't PHP have access to the assets folder? Not sure how it works though so just wondering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants