{"action":"created","issue":{"url":"https://api.github.com/repos/sehmaschine/django-filebrowser/issues/270","labels_url":"https://api.github.com/repos/sehmaschine/django-filebrowser/issues/270/labels{/name}","comments_url":"https://api.github.com/repos/sehmaschine/django-filebrowser/issues/270/comments","events_url":"https://api.github.com/repos/sehmaschine/django-filebrowser/issues/270/events","html_url":"https://github.com/sehmaschine/django-filebrowser/issues/270","id":67832092,"number":270,"title":"incompatible with storages lacking a path implementation","user":{"login":"smcoll","id":321438,"avatar_url":"https://avatars.githubusercontent.com/u/321438?v=3","gravatar_id":"","url":"https://api.github.com/users/smcoll","html_url":"https://github.com/smcoll","followers_url":"https://api.github.com/users/smcoll/followers","following_url":"https://api.github.com/users/smcoll/following{/other_user}","gists_url":"https://api.github.com/users/smcoll/gists{/gist_id}","starred_url":"https://api.github.com/users/smcoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smcoll/subscriptions","organizations_url":"https://api.github.com/users/smcoll/orgs","repos_url":"https://api.github.com/users/smcoll/repos","events_url":"https://api.github.com/users/smcoll/events{/privacy}","received_events_url":"https://api.github.com/users/smcoll/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"sehmaschine","id":185432,"avatar_url":"https://avatars.githubusercontent.com/u/185432?v=3","gravatar_id":"","url":"https://api.github.com/users/sehmaschine","html_url":"https://github.com/sehmaschine","followers_url":"https://api.github.com/users/sehmaschine/followers","following_url":"https://api.github.com/users/sehmaschine/following{/other_user}","gists_url":"https://api.github.com/users/sehmaschine/gists{/gist_id}","starred_url":"https://api.github.com/users/sehmaschine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sehmaschine/subscriptions","organizations_url":"https://api.github.com/users/sehmaschine/orgs","repos_url":"https://api.github.com/users/sehmaschine/repos","events_url":"https://api.github.com/users/sehmaschine/events{/privacy}","received_events_url":"https://api.github.com/users/sehmaschine/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-04-11T20:53:31Z","updated_at":"2015-07-27T22:23:12Z","closed_at":"2015-07-23T10:44:18Z","body":"According to a [docstring in the Django docs](https://github.com/django/django/blob/1.8/django/core/files/storage.py#L109), a `path` property isn't always available on a storage class, as some storage systems can't implement it.  That appears to have been the case since at least 1.0.\r\n\r\n[`FileObject`](https://github.com/sehmaschine/django-filebrowser/blob/3.5.7/filebrowser/base.py#L209) seems to rely heavily on a path attribute, though.  This means that some valid storage implementations \r\nare going to be incompatible with filebrowser.\r\n\r\nOne place where this is an issue is [this usage of the `version_object` template tag](https://github.com/sehmaschine/django-filebrowser/blob/3.5.7/filebrowser/templates/filebrowser/include/filelisting.html#L9), which is passing a `FileObject` to the [VersionObjectNode](https://github.com/sehmaschine/django-filebrowser/blob/3.5.7/filebrowser/templatetags/fb_versions.py#L21), which in turn leverages the path attribute during type-checking.\r\n\r\nPerhaps a solution is to implement `FileObject` in such a way that it can be instantiated from either a path or a File object, or be sure to pass File objects to `VersionNode` in the templates.  Any thoughts?"},"comment":{"url":"https://api.github.com/repos/sehmaschine/django-filebrowser/issues/comments/125365661","html_url":"https://github.com/sehmaschine/django-filebrowser/issues/270#issuecomment-125365661","issue_url":"https://api.github.com/repos/sehmaschine/django-filebrowser/issues/270","id":125365661,"user":{"login":"smcoll","id":321438,"avatar_url":"https://avatars.githubusercontent.com/u/321438?v=3","gravatar_id":"","url":"https://api.github.com/users/smcoll","html_url":"https://github.com/smcoll","followers_url":"https://api.github.com/users/smcoll/followers","following_url":"https://api.github.com/users/smcoll/following{/other_user}","gists_url":"https://api.github.com/users/smcoll/gists{/gist_id}","starred_url":"https://api.github.com/users/smcoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smcoll/subscriptions","organizations_url":"https://api.github.com/users/smcoll/orgs","repos_url":"https://api.github.com/users/smcoll/repos","events_url":"https://api.github.com/users/smcoll/events{/privacy}","received_events_url":"https://api.github.com/users/smcoll/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T22:23:12Z","updated_at":"2015-07-27T22:23:12Z","body":"@sehmaschine on a cursory review of the [14 storage backends in django-storages](https://github.com/jschneier/django-storages/tree/master/storages/backends), only one (mogile) has an implementation of the path attribute.  So this isn't an issue limited to S3 support.  At the very least, perhaps the documentation for django-filebrowser should mention that any storage backend without a path implementation will not be supported.\r\n"}}