code: def upload_create(self, tags, rating, file_=None, source=None,
                        parent_id=None):
          
          if file_ or source is not None:
              params = {
                  'upload[source]': source,
                  'upload[rating]': rating,
                  'upload[parent_id]': parent_id,
                  'upload[tag_string]': tags
                  }
              file_ = {'upload[file]': open(file_, 'rb')}
              return self._get('uploads.json', params, 'POST', auth=True,
                               file_=file_)
          else:
              raise PybooruAPIError("'file_' or 'source' is required.")
docs: Function to create a new upload (Requires login).
  
          Parameters:
              tags (str):
              rating (str): Can be: `s`, `q`, or `e`. Alternatively, you can
                            specify `rating:safe`, `rating:questionable`, or
                            `rating:explicit` in the tag string.
              file_ (file_path): The file data encoded as a multipart form.
              source (str): The source URL.
              parent_id (int): The parent post id.
  
          Raises:
              PybooruAPIError: When file_ or source are empty.