更新时间:2022-04-17 08:51:41
从url解析文件名(请参阅相关问题此处 )。然后,您可以通过向files.blobstore.create调用添加一个附加参数来设置它:
Parse the filename from the url (see related question here). Then you can set it by adding an additional parameter to your files.blobstore.create call:
file_name = files.blobstore.create(mime_type='image/png',_blobinfo_uploaded_filename=file_name_from_url)