@use_kwargs(get_args)<EOL><INDENT>@pass_record<EOL>@need_record_permission('<STR_LIT>')<EOL>def get(self, pid, record, key, version_id, **kwargs):<DEDENT>
try:<EOL><INDENT>obj = record.files[str(key)].get_version(version_id=version_id)<EOL>return self.make_response(<EOL>obj=obj or abort(<NUM_LIT>), pid=pid, record=record)<EOL><DEDENT>except KeyError:<EOL><INDENT>abort(<NUM_LIT>)<EOL><DEDENT>
Get file.

        Permission required: `read_permission_factory`.

        :param pid: Pid object (from url).
        :param record: Record object resolved from the pid.
        :param key: Unique identifier for the file in the deposit.
        :param version_id: File version. Optional. If no version is provided,
            the last version is retrieved.
        :returns: the file content.