mirror of
https://github.com/System-End/cdn.git
synced 2026-04-19 22:05:13 +00:00
fixy fixy!
This commit is contained in:
parent
dd9ad184d0
commit
e0f88005ff
2 changed files with 5 additions and 5 deletions
|
|
@ -83,11 +83,11 @@ class ProcessSlackFileUploadJob < ApplicationJob
|
|||
quota_service = QuotaService.new(@user)
|
||||
policy = quota_service.current_policy
|
||||
|
||||
if upload.file.byte_size > policy.max_file_size
|
||||
if upload.byte_size > policy.max_file_size
|
||||
upload.destroy!
|
||||
raise QuotaExceededError.new(
|
||||
:file_too_large,
|
||||
"File is #{number_to_human_size(upload.file.byte_size)} but max is #{number_to_human_size(policy.max_file_size)}"
|
||||
"File is #{number_to_human_size(upload.byte_size)} but max is #{number_to_human_size(policy.max_file_size)}"
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
section "Yeah! Here's yo' links <@#{slack_user_id}>", markdown: true
|
||||
section "Yeah! Here's yo' links <@#{slack_user_id}>!", markdown: true
|
||||
|
||||
uploads.each do |upload|
|
||||
section "<#{upload.cdn_url}|#{upload.filename}>", markdown: true
|
||||
section "#{upload.cdn_url}", markdown: true
|
||||
end
|
||||
|
||||
context [mrkdwn_text("Manage your files at <https://cdn.hackclub.com|cdn.hackclub.com>")]
|
||||
context [mrkdwn_text("(manage your files at <https://cdn.hackclub.com|cdn.hackclub.com>!)")]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue