filename is the full file location and name of the file
    WARNING: If your desiredName doesn't have a proper file extension (SHOULD
    be the same as the filename) it'll still upload, but you won't be able to
    download it or view it online. You can edit the name later to add the
    extension, but be careful, because it seems like you can't change the
    extension after that.

    If progress_cb is not None, it should be a callable which takes two
    arguments: the total number of bytes to upload and the number of bytes
    which have been uploaded. The callable is called periodically to show the
    progress of the upload.

def UploadItem(filename, gallery, desiredName=None, progress_cb=None):
    """filename is the full file location and name of the file
    WARNING: If your desiredName doesn't have a proper file extension (SHOULD
    be the same as the filename) it'll still upload, but you won't be able to
    download it or view it online. You can edit the name later to add the
    extension, but be careful, because it seems like you can't change the
    extension after that.

    If progress_cb is not None, it should be a callable which takes two
    arguments: the total number of bytes to upload and the number of bytes
    which have been uploaded. The callable is called periodically to show the
    progress of the upload.

    """

    # Must have the ? because urlencode doesn't add that on itself
    url = 'http://min.us/api/UploadItem?'

    if desiredName:
        name = desiredName
    else:
        name = filename

    params = {"editor_id":gallery.editor_id, "filename":name}

    with open(filename, 'rb') as f:
        itemData = f.read()

    response = _dopost(url, params=params,
            payload=itemData, progress_cb=progress_cb)

    _id = response["id"]
    _height = response["height"]
    _width = response["width"]
    _filesize = response["filesize"]

    return Item(_id, height=_height, width=_width, filesize=_filesize)