Skip to content

Added ability to specify allowed extensions for attachments. - #302

Open
bellingeri wants to merge 1 commit into
Zavy86:masterfrom
bellingeri:master
Open

Added ability to specify allowed extensions for attachments.#302
bellingeri wants to merge 1 commit into
Zavy86:masterfrom
bellingeri:master

Conversation

@bellingeri

Copy link
Copy Markdown

Hi.

I've added the ability to define which extensions are accepted in attachments.

The default setting is set upon initial startup [setup.php] without prompting the user (to keep the installation streamlined) and can then be changed in [settings.php].

Previously, the accepted files were statically listed in the code (perhaps with some differences between the various files).

I had to comment out the mime/type verification section: I find it complex to ask the user to enter them.
Someone could instead provide a list of "extensions" to "mime/types" and check using that.
Comments are welcome!

I've also prepared translations for the added strings, but with automatic translators... not the best.

The default setting is set on first launch.
It can be changed in the settings.

@Zavy86 Zavy86 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when the update occurs until the new settings are available? Does it load an empty array or does it fail? (I haven't been able to test this yet; you might already know.)

@bellingeri

Copy link
Copy Markdown
Author

Good question!
If the constant isn't defined in the config file, existing attachments won't be displayed, and you obviously won't be able to add more.
You need to go to the configuration and fill in the field...

@bellingeri

Copy link
Copy Markdown
Author

Hi.
What do you think about providing a simple file for managing updates?
...even for future updates that require further configuration changes.

Something like this: update.php

Let me know...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants