cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know all about tools for creatives that work seamlessly with Dropbox, like Adobe? Well, check it out right 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: 

C# Dropbox.api nuget - Upload via proxy

C# Dropbox.api nuget - Upload via proxy

osherbd
New member | Level 2

Hi,

I am using Dropbox.api nuget in C#.

I would like to know if there is an option to set a proxy that the files will be uploud using it?..

1 Accepted Solution

Accepted Solutions

Re: C# Dropbox.api nuget - Upload via proxy

Greg-DB
Dropboxer

I don't believe we have any specific sample code for this, but you can construct a DropboxClient with a custom HttpClient which can include proxy settings:

https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_DropboxClient__ctor_1.htm

https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_DropboxClientConfig.htm

View solution in original post

3 Replies 3

Re: C# Dropbox.api nuget - Upload via proxy

Greg-DB
Dropboxer

I don't believe we have any specific sample code for this, but you can construct a DropboxClient with a custom HttpClient which can include proxy settings:

https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_DropboxClient__ctor_1.htm

https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_DropboxClientConfig.htm

View solution in original post

Re: C# Dropbox.api nuget - Upload via proxy

osherbd
New member | Level 2

Thanks!

Re: C# Dropbox.api nuget - Upload via proxy

benktesh
Explorer | Level 4

I have begun to work with Dropbox api and I encountered this issue.

Here is my solution.

private static DbxClientV2 getClient(String token, String host) {
		Proxy proxy = getProxy();
		Config config = Config.builder().withProxy(proxy).build();		
		StandardHttpRequestor requester = new StandardHttpRequestor(config);
		DbxRequestConfig requestConfig = DbxRequestConfig.newBuilder("example").withHttpRequestor(requester).build();
		DbxClientV2 dbxClient = new DbxClientV2(requestConfig, token, host);
		return dbxClient;
	} 

 

Poll
Do you work or study in the creative industry? If so, which area?
If you use Adobe, don't forget to check out our latest integrations update here.
Who's talking

Top contributors to this post

  • User avatar
    benktesh Explorer | Level 4
  • User avatar
    osherbd New member | Level 2
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?