'create( self, trans, job_id, payload, **kwargs )
* POST /api/jobs/{job_id}/files
Populate an output file (formal dataset, task split part, working
directory file (such as those related to metadata)). This should be
a multipart post with a \'file\' parameter containing the contents of
the actual file to create.
:type   job_id: str
:param  job_id: encoded id string of the job
:type   payload:    dict
:param  payload:    dictionary structure containing::
\'job_key\'   = Key authenticating
\'path\'      = Path to file to create.
..note:
This API method is intended only for consumption by job runners,
not end users.
:rtype:     dict
:returns:   an okay message'

@expose_api_anonymous_and_sessionless
def create(self, trans, job_id, payload, **kwargs):

    job = self.__authorize_job_access(trans, job_id, **payload)
    path = payload.get('path')
    self.__check_job_can_write_to_path(trans, job, path)
    if ('__file_path' in payload):
        file_path = payload.get('__file_path')
        upload_store = trans.app.config.nginx_upload_job_files_store
        assert upload_store, 'Request    appears    to    have    been    processed    by    nginx_upload_module    but    Galaxy    is    not    configured    to    recognize    it'
        assert file_path.startswith(upload_store), ('Filename    provided    by    nginx    (%s)    is    not    in    correct    directory    (%s)' % (file_path, upload_store))
        input_file = open(file_path)
    else:
        input_file = payload.get('file', payload.get('__file', None)).file
    try:
        shutil.move(input_file.name, path)
    finally:
        try:
            input_file.close()
        except OSError:
            pass
    return {'message': 'ok'}
