从本地文件系统上传文件

时间:2019-03-12 06:59:21

标签: python google-colaboratory

我正在尝试上传图片,并想要获取上传图片的URL:

from google.colab import files

uploaded = files.upload()

for fn in uploaded.keys():
  print('User uploaded file "{name}" with length {length} bytes'.format(    
name=fn, length=len(uploaded[fn])))

是否有预定义的函数,或者我必须编写一个函数?

0 个答案:

没有答案