Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

silasas's avatar
silasas
New member | Level 2
6 years ago
Solved

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

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.

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

1 Reply

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

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

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!