Update file in Dropbox

Update file in Dropbox

DRossger
Advocate Advocate
575 Views
1 Reply
Message 1 of 2

Update file in Dropbox

DRossger
Advocate
Advocate

Hello!

 

I would like update a txt-file in public link on my Dropbox. Is there a way. I was looking little on Dropbox developer api, but could not use upload-function right. Anybody who has tested before?

To read a file from Dropbox it´s easy. But I don´t know if it´s possible to update without permission

public void ReadTxt()
        {
            try
            {
                WebClient client = new WebClient();
                Stream stream = client.OpenRead("https://dl.dropboxusercontent.com/u/174474939/02Landskap/test.txt");
                StreamReader reader = new StreamReader(stream, UTF8Encoding.UTF8);
                content = reader.ReadToEnd();
                MessageBox.Show("\n" + content);
                reader.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show("No Connection - Can´t read user account!");
            }
        }
0 Likes
576 Views
1 Reply
Reply (1)
Message 2 of 2

norman.yuan
Mentor
Mentor

This has little to do with AutoCAD programming, I'd bet you would not get many responses from regulars here.

 

That said, doing a google search for "upload files to drop box using c#" brings tons of links, sample code, such as 

 

upload file to dropbox using c#

https://www.example-code.com/csharp/dropbox_file_stream_upload.asp

https://www.youtube.com/watch?v=fcT-Jt8rcdY

 

Just list a few.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes