Skip to content

Make the media library play nicely with alternative storages #15

@lewiscollard

Description

@lewiscollard

Currently, the media library has in a few places the assumption that files will be files on a local disk, rather than e.g. S3 or any of the other alternative ways of storing files (see also: django-storages). This might not be a good assumption, and could limit adoption by people who like clouds. Nothing inherently requires that alternative storages can not be used, so the dependency on a local file system should be removed.

Areas of concern:

  • the get_dimensions method assumes that the file is a local file and tries to open it
  • the media file list in the admin assumes that file.size is free (does it have a cost in cloud storage?)
  • File.is_image assumes that files have filenames with an extension (do they on cloud storages?)
  • if it works, document it, and if it cannot work document that too

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