I am getting HTTP/1.1 400 Bad request error while uploading files larger than 250 MB to a SPO document library via REST API. Mine is a dedicate O365 tenant and has a file upload limit of 10GB. When tried uploading files larger than 250 MB via drag and drop it works perfectly fine. but geeting error when try to do the same via REST API. Below is my code snippet.
wreq.Method = "POST"; wreq.Timeout = 1000000; //timeout should be large in order to upload file which are of large size wreq.Accept = "application/json; odata=verbose"; wreq.ContentLength = binary.Length;