cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it 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: 

can our website`s users upload without create an account

can our website`s users upload without create an account

Esikhoob
Helpful | Level 5

Hi

In our ASP.NET website ,we want to give to our users, the ability to upload to Dropbox, instead of our website (because of lack of space).

I read API`s documentation and example of JavaScript`s SDK and found out all user should have to sign in to their own Dropbox`s account ,No matter the file is uploading to our Dropbox account.

Is there any other way except this way? I mean without sign in to their account, which we do not use?

4 Replies 4

Здравко
Legendary | Level 20

Hi @Esikhoob,

You can handle your problem in 2 ways generally. You can forward (re-upload) the files your users upload to your website to Dropbox using any of the available upload methods (depending on the files count/size) without storing them to your server at all. Such a way is more predictable since you're doing everything and all is on your control - your server would serve as something like a proxy. Another way is to generate temporary upload link(s) and upload directly from end users browser to Dropbox server. Such a way is more simple to implement, but difficult for trace and debug if any issue appears (you should implement some way for logging what happens on users browser to be aware of issues nature).

Good luck.

Esikhoob
Helpful | Level 5

Thankyou

 

I think there is a third way. using your answer in https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/What-function-in-NET-SDK-is-for-oauth2-... , I can generate access token in .NET side (help of modified .NET`s SDK) and send them to Javascript side and use that to send file with help of Javascript`s SDK.

I have a question on your second ways:

Do you mean I can upload a file to a Dropbox`s shared link with help of Javascript`s SDK? I tried to upload a file to a Dropbox`s shared link using Postman software. As you can see in the attached picture, I get an error. POSTMAN_Dropbox_sent_to_shared_link.png

Здравко
Legendary | Level 20

@Esikhoob wrote:

...

I think there is a third way. using your answer in https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/What-function-in-NET-SDK-is-for-oauth2-... , I can generate access token in .NET side (modified .NET`s SDK) and send them to Javascript side and use that to send file with help of Javascript`s SDK.

...


Yes, it's always an option for everything, but in such a way you're exposing (despite of temporary) the access you granted to the end user (the passed access token can be caught). This way is only usable for "internal" use (i.e. in a set of users that you can rely on). Otherwise your system can be hacked very easy! 🤫

 


@Esikhoob wrote:

...

Do you mean I can upload a file to a Dropbox`s shared link with help of Javascript`s SDK? I tried to upload a file to a Dropbox`s shared link using Postman software. As you can see in the attached picture, I get an error. 


First of all, you're using preview link, not a shared one! Anyway, you cannot upload using any such link (preview or real shared link). As I said you need upload link - it's something different. Take a look here in the sources for details. 😉

Hope this sheds some more light.

Greg-DB
Dropbox Staff

@Esikhoob The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. As Здравко said, you can send files to just your own account, though you should not expose any access tokens or refresh tokens for your account to other users. And as they mentioned, you could instead do so by essentially proxying the file uploads through your own server, or by using temporary upload links. It is not possible to upload directly to a preview link or shared link.

 

Alternatively, you may want to use "file requests". The API also offers the ability to manage file requests programmatically.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
  • User avatar
    Esikhoob Helpful | Level 5
What do Dropbox user levels mean?