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

MediaBrowser allowedFileTypes is empty #14604

Open
sdrenth opened this issue Jun 14, 2019 · 2 comments

Comments

@sdrenth
Copy link
Contributor

commented Jun 14, 2019

Bug report

Summary

When having a mediasource and setting the allowedFileTypes to jpg,jpeg,png,gif,psd,ico,bmp,svg,doc,docx,pdf,vcf. I still see files which should be hidden. While debugging I found out that the allowedFileTypes property in the processor is empty:

action: browser/directory/getfiles
prependPath: 
prependUrl: 
source: 3
allowedFileTypes: 
wctx: web
dir: 

So I did a console.log inside modx.browser.js on line 39:

console.log(config);

Which outputs:
{xtype: "modx-browser-view", onSelect: {…}, source: "3", allowedFileTypes: "", wctx: "web", …}
allowedFileTypes: ""
baseParams: {action: "browser/directory/getfiles", prependPath: null, prependUrl: null, source: "3", allowedFileTypes: "", …}
closeAction: "hide"
........

Step to reproduce

  1. Set the allowedFileTypes property of a mediasource to: jpg,jpeg,png,gif,psd,ico,bmp,svg,doc,docx,pdf,vcf
  2. Add for example a .gitignore file into one of the directories of the source
  3. Now you see that the .gitignore file is still visible

Observed behavior

I still see the .gitignore files and other files which are not included in the allowedFileTypes property of the mediasource. And I also noticed that the property is an empty string in the config in ExtJS, while that should contain the same value as configured in the media source.

Expected behavior

I expected the .gitignore files to not be visible anymore and also the allowedFileTypes ExtJS property to have the same value as configured in the media source.

Environment

MODX 3

@sdrenth

This comment has been minimized.

Copy link
Contributor Author

commented Aug 6, 2019

Also see this screenshot which calls the getlist processor:

Screenshot 2019-08-06 at 14 11 53

@JoshuaLuckers

This comment has been minimized.

Copy link
Collaborator

commented Aug 6, 2019

After reproducing this issue I noticed that the file tree handles this correctly but the Media Browser doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.