我正在尝试将我从手机拍摄的图像发送到Firebase存储。第一个函数使用图像选择器插件获取图像,并将路径返回作为上传函数的参数传递。图像上传到云存储,但在面板中类型为application/octet-stream并且图像不显示Stringdownload_path;varimageFile;picker()async{FiletheImage=awaitImagePicker.pickImage(source:ImageSource.gallery);imageFile=theImage;vartheimagepath=theImage.path;setState((){imageF
我正在尝试将我从手机拍摄的图像发送到Firebase存储。第一个函数使用图像选择器插件获取图像,并将路径返回作为上传函数的参数传递。图像上传到云存储,但在面板中类型为application/octet-stream并且图像不显示Stringdownload_path;varimageFile;picker()async{FiletheImage=awaitImagePicker.pickImage(source:ImageSource.gallery);imageFile=theImage;vartheimagepath=theImage.path;setState((){imageF
我正在尝试从StringIO(或cStringIO,更具体地说)获取数据并将其转换为django.core.files.images.ImageFile。但它不起作用。无论如何,我的意思是它在很多方面都失败了,而谷歌让我失望了。到目前为止我有:pi=ProductImage(product=product)image=ImageFile(image_file)image.name=image_name#definedelsewherepi.source_image.save(image_name,image)pi.save()我的堆栈跟踪是这样的:File"dev.py",line35