我遇到了将大于4兆的文件上传到cloudinary的问题, 我正在使用C#上传文件。 我已经在配置下设置了我的应用程序,以允许更大的上传数量,如下所示:
<httpRuntime targetFramework="4.5" maxRequestLength="1048576" />
和
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
我的代码部分如下:
Stream trackStream = trackfile.InputStream;
var uploadParams = new RawUploadParams
{
File = new FileDescription(trackName, trackStream),
Folder = "tracks"
};
RawUploadResult uploadResult = _cloudinary.Upload(uploadParams);
return uploadResult.Uri.AbsoluteUri;
然而,当我尝试发送文件时有一个恐怖: 请求已中止:请求已取消。 并且在此操作上抛出异常:
RawUploadResult uploadResult = _cloudinary.Upload(uploadParams);