上传其他图片是成功的,我用QQ截图保存png格式上传也是失败,保存jpg格式能成功!
上一图是错误信息,下图是抛出错误的地方。也不知道是什么原因?
Exception Date:2017/9/8 13:02:41
Exception Type:System.ArgumentException
Exception Message:Path cannot be the empty string or all whitespace.
Exception Source:mscorlib
Exception StackTrace: at System.IO.Directory.CreateDirectory(String path)
at Qiniu.Storage.Persistent.ResumeRecorder.createDirIfNotExist()
at Qiniu.Storage.Persistent.ResumeRecorder..ctor(String dir)
at Qiniu.Storage.UploadManager.uploadStream(Stream stream, String key, String token, UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler)
at EastWestWalk.UpLoadWeb.Controllers.FileUploadController.UploadMain(Stream stream, String fileType, CommonData data)
at EastWestWalk.UpLoadWeb.Controllers.FileUploadController.UpLoading(String type, String bucket, String returnUrl, String size)
您好,根据报错信息,应该是向上传方法传入了空的 filepath 导致的。您可以把 path 打下 log 确认下,是否为空。