implement previews of single shared files
allow permissions.user to be null as suggested by @butonic