我正在使用Azure Storage SDK从设备sdcard或相机应用程序上传图像,但即使是从图库应用程序返回的Uri,我也会收到FileNotFoundException。
这是我的代码:
private String uploadImage(CloudBlobContainer container, Uri photoUri) throws URISyntaxException, StorageException, IOException {
String filename = FileUtilities.getFilenameFromUri(mContext, photoUri);
// Upload an image file.
CloudBlockBlob blob = container.getBlockBlobReference(filename);
blob.uploadFromFile(photoUri.getPath());
return filename;
}
photoUri值:content:// media / external / images / media / 3617 文件名值:20141012_084042.jpg
我的代码出了什么问题?