Closed teosangio79 closed 3 years ago
To fix the issue I changed:
FileDescription class
internal long BytesSent;
before it was 'internal int BytesSent;'
@teosangio79 , feel free to open a pull request with the fix.
@teosangio79 , thank you for contribution!
Bug report for Cloudinary .NET SDK
Before proceeding, please update to latest version and test if the issue persists
Describe the bug in a sentence or two.
When you try to upload a file larger then 2Gb (video) the SDk get an exception
Issue Type (Can be multiple)
Steps to reproduce
Upload a video larger then 2Gb
Error screenshots or Stack Trace (if applicable)
Unhandled Exception: System.IO.IOException: An attempt was made to move the file pointer before the beginning of the file.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.SeekCore(Int64 offset, SeekOrigin origin) at System.IO.FileStream.Seek(Int64 offset, SeekOrigin origin) at CloudinaryDotNet.ApiShared.SetStreamToStartAndCreateWriter(FileDescription file, Stream stream) at CloudinaryDotNet.ApiShared.GetRangeFromFile(FileDescription file, Stream stream) at CloudinaryDotNet.ApiShared.PrepareMultipartFormDataContent(SortedDictionary
2 parameters, FileDescription file, Dictionary
2 extraHeaders) at CloudinaryDotNet.ApiShared.PrepareRequestContent(HttpRequestMessage request, SortedDictionary2 parameters, FileDescription file, Dictionary
2 extraHeaders) at CloudinaryDotNet.ApiShared.PrepareRequestBody(HttpRequestMessage request, HttpMethod method, SortedDictionary2 parameters, FileDescription file, Dictionary
2 extraHeaders) at CloudinaryDotNet.ApiShared.Call(HttpMethod method, String url, SortedDictionary2 parameters, FileDescription file, Dictionary
2 extraHeaders) at CloudinaryDotNet.ApiShared.CallAndParse[T](HttpMethod method, String url, SortedDictionary2 parameters, FileDescription file, Dictionary
2 extraHeaders) at CloudinaryDotNet.ApiShared.CallApi[T](HttpMethod method, String url, BaseParams parameters, FileDescription file, Dictionary`2 extraHeaders) at CloudinaryDotNet.Cloudinary.UploadLarge[T](BasicRawUploadParams parameters, Int32 bufferSize) at CloudinaryDotNet.Cloudinary.UploadLarge(VideoUploadParams parameters, Int32 bufferSize)OS and Version
Versions and Libraries (fill in the version numbers)
Repository
If possible, please provide a link to a reproducible repository that showcases the problem