cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The proxy server received an invalid response from an upstream server (.NET CORE)

The proxy server received an invalid response from an upstream server (.NET CORE)

silasas
New member | Level 2
Go to solution

Dears, I am uploading files (large files) and when it is ends, this error appear (azure and linux):

 

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request

Reason: Error reading from remote server

 

I am using ChunkUpload, follow:

 

using (var stream = armazenaDropBox.Imagem.OpenReadStream())
                    {
                        int numChunks = (int)Math.Ceiling((double)stream.Length / chunkSize);

                        byte[] buffer = new byte[chunkSize];
                        string sessionId = null;

                        //armazenaDropBox.progressBar = 0;

                        for (var idx = 0; idx < numChunks; idx++)
                        {
                            //Console.WriteLine("Start uploading chunk {0}", idx);
                            var byteRead = stream.Read(buffer, 0, chunkSize);

                            using (MemoryStream memStream = new MemoryStream(buffer, 0, byteRead))
                            {
                                if (idx == 0)
                                {
                                    var result = await dba.Files.UploadSessionStartAsync(body: memStream);
                                    sessionId = result.SessionId;
                                }

                                else
                                {
                                    UploadSessionCursor cursor = new UploadSessionCursor(sessionId, (ulong)(chunkSize * idx));

                                    if (idx == numChunks - 1)
                                    {
                                        await dba.Files.UploadSessionFinishAsync(cursor, new CommitInfo(armazenaDropBox.Folder + "/" + armazenaDropBox.FileName), memStream);
                                    }

                                    else
                                    {
                                        await dba.Files.UploadSessionAppendV2Async(cursor, body: memStream);
                                    }
                                }
                            }

                            //armazenaDropBox.progressBar = 100;

                        }

 

The upload is working perfectlly, but appear it.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

I see you also opened a support ticket for this, so we'll follow up with you there.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

I see you also opened a support ticket for this, so we'll follow up with you there.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?