react-butterfiles icon indicating copy to clipboard operation
react-butterfiles copied to clipboard

Add inverse property to "accept" property

Open kvvinokurov opened this issue 5 years ago • 6 comments

This is:

  • Feature request
  • Question

Detailed Description

I allow sending all files, for example, with the exception of executable ones.

kvvinokurov avatar Oct 29 '19 16:10 kvvinokurov

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.

adrians5j avatar Nov 03 '19 11:11 adrians5j

May be exclude

kvvinokurov avatar Nov 06 '19 08:11 kvvinokurov

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 avatar Nov 06 '19 08:11 kvvinokurov

@kvvinokurov Interesting feature request.

Can you please move this into a separate issue?

Thank you!

adrians5j avatar Nov 06 '19 08:11 adrians5j

@kvvinokurov Interesting feature request.

Can you please move this into a separate issue?

Thank you!

ok

kvvinokurov avatar Nov 06 '19 08:11 kvvinokurov

https://github.com/doitadrian/react-butterfiles/issues/8

kvvinokurov avatar Nov 06 '19 08:11 kvvinokurov