def METHOD_NAME(obj, expiration: int = 3600):
    """
    Returns a HTTP response of a media object or a redirect to the image URL for S3 and
    Azure storage objects.
    """
    file_path = obj.media_file.name
    default_storage = get_storage_class()()
    filename = file_path.split("/")[-1]
    content_disposition = urllib.parse.quote(f"attachment; filename={filename}")
    s3_class = None
    azure = None
    try:
        s3_class = get_storage_class("storages.backends.s3boto3.S3Boto3Storage")()
    except ModuleNotFoundError:
        pass
    try:
        azure = get_storage_class("storages.backends.azure_storage.AzureStorage")()
    except ModuleNotFoundError:
        pass
    if isinstance(default_storage, type(s3_class)):
        try:
            url = generate_aws_media_url(file_path, content_disposition, expiration)
        except ClientError as e:
            logging.error(e)
            return None
        else:
            return HttpResponseRedirect(url)
    if isinstance(default_storage, type(azure)):
        media_url = generate_media_url_with_sas(file_path, expiration)
        return HttpResponseRedirect(media_url)
    # pylint: disable=consider-using-with
    file_obj = open(settings.MEDIA_ROOT + file_path, "rb")
    response = HttpResponse(FileWrapper(file_obj), content_type=obj.mimetype)
    response["Content-Disposition"] = content_disposition
    return response