Make allowed file endings configurable #271
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @PhilippMatthes, this is a good starting point. Please address my comments and also provide unit tests. Then it should be good to go.
0ad00e2
to
d957a61
Compare
Martin's suggestions were taken into account and added to this branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better, still some points to address. Also, we need to think about case-sensitive vs. case-insensitive. Neither the constance help text nor the test cases mention (or test, respectively) case insensitivity.
d957a61
to
8214ff2
Compare
@martinmo I addressed your recommendations and added another test. Please look into it again. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added comments of the third review round. There are still some very minor issues.
Concerning the term "file ending", I would prefer to use "filename extension" instead. File ending is not accurate and could also refer to the last character of the contents of a file. Wikipedia also refers to that name (https://en.wikipedia.org/wiki/Filename_extension).
8214ff2
to
13e6a89
Compare
Suggestions were taken into account.
f9be5ae
to
017ca95
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The validation fails with an AttributeError
if I use the manual upload. See comments for the reason. I suggest to adapt the validation function to take a list of filenames as an argument. Use upload.keys()
when it is a dict. Use a list comprehension when it is a list of objects.
Update: in the second case, it's of course not just a list of filenames, but a list of file objects instead.
@martinmo you are right. Didn't think about that one. |
I'll fix this tomorrow morning. Sorry for the inconveniences. |
Suggestions were taken into account.
3f52195
to
a30e2fe
Compare
Fixes: #205