This commit introduces a new config variable, files.maximum-file-size.
It affects newly uploaded files, preventing them from being uploaded if
they exceed the specified file size.
Partially resolves T15972
Differential D25853
Add configuration option for maximum file size BlankEclair on Wed, Dec 11, 07:50. Authored by Tags None Referenced Files
Subscribers
Details
This commit introduces a new config variable, files.maximum-file-size. Partially resolves T15972
Diff Detail
Event Timeline
Comment Actions Move assertion to a different function To reduce duplicate calls for PhabricatorEnv#getEnvConfig, the code now
Comment Actions Ouch we should maybe already skip this limit if the user has $user->isOmnipotent(), otherwise some daemons may crash. That means "Uff", extra logics to actually receive an User object 🐇 🐇 🐇 and I don't know how to do that lol Comment Actions Hoping to help: maybe maybe, we can be prepared to receive that User $actor but: null as default \o/ and we can just skip this additional limitation if it's null, assuming that null = SomebodyImportant™ With this extra care we should be able to introduce zero regressions but extra limitation applied for lusers Comment Actions $params has an optional authorPHID key, whose value is... well, the PHID of the author (if applicable). I suppose we can reuse that here? ...but it seems like uploading a profile picture does not set it. It depends on what the purpose of this is for I suppose. Comment Actions I wonder if we can expand that to provide an authorUser too, in many places as possible 🤔
\o/ You've probably also discovered the root problem of T15407: People: profile picture should be editable by their author (not by "No one")
So maybe that's a good news. Maybe it means we should move the logic inside PhabricatorFileUploadSource() that is more high-level (?) but we still need to add some setAuthor() methods We are inside a rabbit hole my friend lol Comment Actions
but i'm lazyyyy :(
Oh no
Tried that, chunking still bypasses it lol
Yes, yes we are. |