Skip to content

Improvement: Split download_attachment into 2 functions #387

Description

@herronelou

Hi.

We often need to download SG thumbnails from the thumbnail's URL.

We wrote code to do that which is essentially duplicated code from sg.download_attachment, the main difference being that instead of passing in an attachment, we directly pass the URL that the function extracts at

url = self.get_attachment_download_url(attachment)

Could we split the code into 2 functions, one to download by URL, and one to download by attachment, as it's essentially the same code?

I can put an MR if you're not against the idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions