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.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

using c# for upload text file

using c# for upload text file

MartaMarco1972
Explorer | Level 3
Go to solution

I'm trying to upload a text file to my account, but something I'ts wrong

 

static async Task Run()
{
	using (var dbx = new DropboxClient("MYTOKEN"))
	{
		var file = "list.txt";
		var folder = "/Users/user01/Downloads/";
		var lastpath = folder + file;
		var mem = new MemoryStream(File.ReadAllBytes(@"C:\Users\user01\Downloads\list.txt"));
		var upload = await dbx.Files.UploadAsync(lastpath, Dropbox.Api.Files.WriteMode.Overwrite.Instance, false, null, false, mem);
		Console.WriteLine(upload);
 
		Console.ReadLine();
	}
}

 

14 Replies 14

MartaMarco1972
Explorer | Level 3
Go to solution

All works fine now!

The file was on application directory,

Now I've change the kind of API to access all my files

 

Thanks!

Thanks!!

Thanks!!!

MartaMarco1972
Explorer | Level 3
Go to solution

How can I send a parameter like file name to a task?

Greg-DB
Dropbox Staff
Go to solution
I'm not sure I understand your question. Can you elaborate?

marcomarta1972
Explorer | Level 3
Go to solution
In your tutorial you make a tasks with some parameters (dvd,....,....) how can I Call the task? I am unable to send some parameters to the task

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    marcomarta1972 Explorer | Level 3
  • User avatar
    MartaMarco1972 Explorer | Level 3
What do Dropbox user levels mean?