Python 3.x 如何使用python脚本将用户上传到我网站上的文件存储到azure?

Python 3.x 如何使用python脚本将用户上传到我网站上的文件存储到azure?,python-3.x,azure-storage,web-development-server,Python 3.x,Azure Storage,Web Development Server,用户在我的网站上上载excel文件。我应该编写什么python脚本将文件上载到Azure存储?请在服务器端使用该脚本将文件上载到Azure存储 from azure.storage.file import FileService, ContentSettings def upload_files_to_azure(share, directory, path_of_file): file_service = FileService(account_name='<your acco

用户在我的网站上上载excel文件。我应该编写什么python脚本将文件上载到Azure存储?

请在服务器端使用该脚本将文件上载到Azure存储

from azure.storage.file import FileService, ContentSettings

def upload_files_to_azure(share, directory, path_of_file):
    file_service = FileService(account_name='<your account name>',
                               account_key='<your account key>')
    file_service.create_file_from_path(
        share,
        directory,
        '<file name>',
        path_of_file
    )
    return


upload_files_to_azure("<share name>", None, "<file path on your server>")
从azure.storage.file导入文件服务,内容设置
def将_文件上传到_azure(共享、目录、_文件的路径):
文件服务=文件服务(帐户名称=“”,
帐户(U键=“”)
文件\u服务。从\u路径创建\u文件\u(
分享,
目录
'',
_文件的路径_
)
返回
上传文件到azure(“,无”)
详情请参阅


希望对您有所帮助。

嗨,现在有什么进展吗?