Skip to content

attachment.present? calls AWS API #2802

@Paxa

Description

@Paxa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions