react-butterfiles
react-butterfiles copied to clipboard
Add inverse property to "accept" property
This is:
- Feature request
- Question
Detailed Description
I allow sending all files, for example, with the exception of executable ones.
Cool @kvvinokurov,
I just can't think of a good name for the prop.
Currently, we have accept
for whitelist. What would be the name of the inverse prop (blacklist)?
If we would go in a similar fashion like accept
, maybe we could add reject
or refuse
prop?
I guess:
<Files reject={["application/exe"]}/>
The other ideas that came to my mind: acceptInverse
, notAccept
, acceptBlacklist
.
You have any ideas maybe? :)
P.S. accept
would always have higher priority than reject
. Meaning if the user sets both (eg. by an accident), accept
would be used, and reject
would be ignored.
May be exclude
Maybe add a filter by file name in regex format in addition?
For example, Microsoft SharePoint has the following restrictions on the file name: Information about the characters that you cannot use in file names:
- Do not use: " # % & * : < > ? \ / { | } ~
- File names cannot be longer than 128 characters
- Do not use the period character consecutively in the middle of a file name. For example, "file..name.docx" is invalid.
- You cannot use the period character at the end of a file name. For example, “filename..docx” is invalid.
- You cannot start a file name with the period character
- Many other symbols are not recommended such as $^()-_=+[]`! (other international currency symbols and international symbols should be avoided in site names, but some are more acceptable in file names. Ascii is preferred when possible.
@kvvinokurov Interesting feature request.
Can you please move this into a separate issue?
Thank you!
@kvvinokurov Interesting feature request.
Can you please move this into a separate issue?
Thank you!
ok
https://github.com/doitadrian/react-butterfiles/issues/8