def set_data(self, data=None):
<EOL>odl_repo, url = get_aws_s3_handle(self._config_map)<EOL>repository_id = self._repository_id.get_identifier()<EOL>try:<EOL><INDENT>filename = data.name.split('<STR_LIT:/>')[-<NUM_LIT:1>]<EOL>filename = re.sub(r'<STR_LIT>', '<STR_LIT:_>', filename)  <EOL><DEDENT>except AttributeError:<EOL><INDENT>filename = ObjectId()<EOL><DEDENT>remote_location = str(repository_id) + '<STR_LIT:/>' + str(filename)<EOL>url += '<STR_LIT:/>' + remote_location<EOL>data.seek(<NUM_LIT:0>)<EOL>odl_repo.put_object(<EOL>Body=data.read(),<EOL>Bucket=self._config_map['<STR_LIT>'],<EOL>Key=remote_location<EOL>)<EOL>self._payload.set_url(url)<EOL>
Sets the content data.

        arg:    data (osid.transport.DataInputStream): the content data
        raise:  InvalidArgument - ``data`` is invalid
        raise:  NoAccess - ``Metadata.isReadOnly()`` is ``true``
        raise:  NullArgument - ``data`` is ``null``
        *compliance: mandatory -- This method must be implemented.*