[NOTE][Posting] Revert regressions introduced with c90efe2c52
Entity Note: It doesn't make sense to handle attachments on Note::create. Attachments exist out of Notes, they are a thing on their own. Furthermore, they aren't always handled the same, they most definitely aren't always uploaded files. FileQuota: It doesn't make sense to check if a file is greater than max allowed upload size here. The plugin ensures a user is inside his allowed quota, it's ignorant to anything else. Whether a file respect max upload is a core thing that must be handled directly in the Posting component. TODO: The configuration regarding user and monthly quota must become FileQuotaPlugin settings and be removed from core. c90efe2c52 - [UI] Add mechanism for rendering note contents in different formats. Implement plaintext rendering. Use rendered field for note content, rather than the content itself
This commit is contained in:
@@ -69,12 +69,6 @@ select sum(at.size) as total
|
||||
where ua.actor_id = :actor_id and at.size is not null
|
||||
END;
|
||||
|
||||
$max_file_size = Common::config('attachments', 'file_quota');
|
||||
if ($max_file_size < $filesize) {
|
||||
throw new ClientException(_m('No file may be larger than {quota} bytes and the file you sent was {size} bytes. ',
|
||||
['quota' => $max_file_size, 'size' => $filesize]));
|
||||
}
|
||||
|
||||
$max_user_quota = Common::config('attachments', 'user_quota');
|
||||
if ($max_user_quota !== false) { // If not disabled
|
||||
$cache_key_user_total = "FileQuota-total-user-{$user_id}";
|
||||
|
Reference in New Issue
Block a user