Not sure if that's expected behavior, but when we call file.present? it calls AWS API (HEAD request to AWS)
if attachment.present? # this makes API call (which is slow)
return attachment.url # this is generated with presigned URL feature
end
basically in code we just want to know if there is any file in a model, and not expecting .present? take half second
Not sure if that's expected behavior, but when we call
file.present?it calls AWS API (HEAD request to AWS)basically in code we just want to know if there is any file in a model, and not expecting
.present?take half second