chore: add file size to response (#5054)

Add file_size to the attachment response to display the file size in chat.

Fixes: #4992
This commit is contained in:
Simon 2022-07-18 20:21:24 +07:00 committed by GitHub
parent f004db3d26
commit fd44f9f28a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,7 +68,8 @@ class Attachment < ApplicationRecord
{ {
extension: extension, extension: extension,
data_url: file_url, data_url: file_url,
thumb_url: thumb_url thumb_url: thumb_url,
file_size: file.byte_size
} }
end end