-
Notifications
You must be signed in to change notification settings - Fork 251
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
Client-side output files filtering #204
Comments
Criterias:
|
I'll do it. Can you assign it to me? |
I can't assign you since you are not a creator of this issue. Go ahead eitherway. |
When a user tries to upload a file that is not in the list of extensions for the current configuration, shall we prevent them for doing it? Or let them do it but don't show them later? I mean, I added the 'accept' parameter to the file input, but they can change that by selecting "All files" in their file explorer. Also, they will be able to drag any kind of file. What should we do in these cases? |
The second option in correct:
Your PR should affect client-side solely. Don't involve connectors, please. |
I can see you applied filtering to the fileupload as well. I don't think we need this because this feature is not intended to be used as restriction. Eventually every user of RFM can change query param This feature is for filtering out specific files in folders to display only images or media files. Later we can UI icons to filter lists by mouse click event without changing URL. Let me know if you can see any case when we need to apply filtering to files upload part. |
Hello, I don't fully understand what you mean. Is it the: What I intended with this was to show the user the subset of file extensions in the browser file explorer. But it is not a restriction indeed, since he can just select "All files" in the explorer. If you mean the piece of code added to the 'fileuploadalways' and so on events, I was trying to do what we talked about in the PR: let the user upload the files but do not show them in the lists later. The file is correctly uploaded and, if you don't pass the By the way, I found a bug when passing the query param and the filter section is not specified neither in the config.json nor in the config.default.json. It throws an undefined error in the Thanks. |
I see, thanks for the clarification. Sounds reasonable. As for the new bug you discovered, create new PR on the "dev" branch, please. |
Hey @Saso222 Changes in UI highlighted on the screenshot:
All this will be release in the v2.5.2 soon |
The
type
parameter is the legacy from original RichFilemanagerAccording to the new security model it's not secure to pass parameter to the server in order to set allowed files extensions list. Thus
type
parameter is ignored in the last versions.However it might be a good idea to use
type
parameter for client-side filtering, just to hide non-image files in case the typeimage
is set. It will not affect files list returned in the connector's response. You have to use server-side config for this.Also, since you may want to define you own extensions list for
images
filter I think the JSON config file should be extended withfilter
option, where you can define your own associations. Example:Raised from psolom/RichFilemanager-PHP#7
The text was updated successfully, but these errors were encountered: