def METHOD_NAME(body, filename, usAddr):
    download = body.get('url')
    if (download is None):
        raise Exception("DownloadUrl is null")
    curExt = fileUtils.getFileExt(filename) # get current file extension
    downloadExt = "." + body.get('filetype')  # get the extension of the downloaded file
    newFilename = False
    # convert downloaded file to the file with the current extension if these extensions aren't equal
    if (curExt != downloadExt):
        try:
            convertedData = serviceConverter.getConvertedData(download, downloadExt, curExt, docManager.generateRevisionId(download), False) # convert file and give url to a new file
            if not convertedData:
                newFilename = True
            else:
                download = convertedData['uri']
        except Exception:
            newFilename = True
    data = docManager.downloadFileFromUri(download)  # download document file
    if (data is None):
        raise Exception("Downloaded document is null")
    isSubmitForm = body.get('forcesavetype') == 3 # SubmitForm
    if(isSubmitForm):
        if (newFilename):
            filename = docManager.getCorrectName(fileUtils.getFileNameWithoutExt(filename) + "-form" + downloadExt, usAddr) # get the correct file name if it already exists
        else :
            filename = docManager.getCorrectName(fileUtils.getFileNameWithoutExt(filename) + "-form" + curExt, usAddr)
        forcesavePath = docManager.getStoragePath(filename, usAddr)
    else:
        if (newFilename):
            filename = docManager.getCorrectName(fileUtils.getFileNameWithoutExt(filename) + downloadExt, usAddr)
        forcesavePath = docManager.getForcesavePath(filename, usAddr, False)
        if (forcesavePath == ""):
            forcesavePath = docManager.getForcesavePath(filename, usAddr, True)
    docManager.saveFile(download, forcesavePath) # save document file
    if(isSubmitForm):
        uid = body['actions'][0]['userid'] # get the user id
        historyManager.createMetaData(filename, uid, "Filling Form", usAddr) # create meta data for forcesaved file
    return