Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Expose administrator configuration for max file upload size #186

Open
hurtstotouchfire opened this issue Nov 25, 2016 · 2 comments
Open

Comments

@hurtstotouchfire
Copy link
Contributor

For videos in particular, it is expected that large files should be uploadable. There needs to be some kind of guidance for website admins regarding how to set this particular setting, and/or we should consider the utility of dynamically modifying this value using a combination of upload_size_limit and administrator guidance for larger PHP .ini settings.

@hurtstotouchfire
Copy link
Contributor Author

hurtstotouchfire commented Nov 25, 2016

@meitar I need a little more context on this to be able to gauge the urgency. I'm assuming we store all of these videos (or other large files) on the WP host, and it looks like they are essentially an attribute of our alert model, meaning that they are in these WP post things that we use for the persistence layer. I'm looking here:

private static function getIncidentMediaHtml ($type, $post_id) {

So does this mean that files are deleted from the server when the alert is deleted (which is handled with wp_delete_post I presume)?

@fabacab
Copy link
Contributor

fabacab commented Nov 25, 2016

I'm assuming we store all of these videos (or other large files) on the WP host,

Correct.

and it looks like they are essentially an attribute of our alert model,

Yeah, essentially.

meaning that they are in these WP post things

Almost. They are actually each their own WP_Post object and have their own record in the wp_posts table in WordPress's underlying database schema. Their post_type field is set to attachment, and they have a foreign key that relates them to the "primary" WP_Post object (which is then wrapped, in this case, with one of our WP_Buoy_Alerts).

So does this mean that files are deleted from the server when the alert is deleted (which is handled with wp_delete_post I presume)?

Not necessarily. It depends on the value of the "Delete attached incident media when deleting old alerts" setting configured by a site administrator.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants