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

View File

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