Curious about A, B, C, and D drives? Learn what they mean and how to use them effectively with Dropbox in this handy guide! - check it out now!
Forum Discussion
Mary2
9 years agoHelpful | Level 5
Dateien werden nicht in Voransicht angezeigt
JPEG Dateien werden in der Voransicht nicht angezeigt, obwohl sie den gelisteten Vorgaben entsprechen. Fehlermeldung:
Die Datei kann nicht in der Voransicht aufgerufen werden
20160820-MR-Wegweiser.jpg · 18,78 MB
Wo liegt das Problem?
0時くらいに技術部門っぽい人から、解決に取り組んでいます、最新情報わかったら連絡します、的なメールが来てました。
んで、今見たら、plusに戻っていました。かつ、今日からライセンス適用開始という粋な対応。皆様、状況いかがでしょうか?(個別対応なら、言わないと直らないという恐ろしいことになりますが・・・)
2 Replies
Sort By
Replies have been turned off for this discussion
- ЗдравкоLegendary | Level 20
lalomores wrote:... Files are not client related, only related to my Dropbox App and corresponding Dropbox app folder.
...Hi lalomores,
Hmm... 🤔 Ok, is the application folder for anyone particular application (including your) just a single thing or is it something specific to every one account, which the same application gets link to?! 🤫
lalomores wrote:...
Checking the Authentication Types the most obvious candidate to replace my long lived token, seems to be "App Authentication": "This type only uses the app's own app key and secret, and doesn't identify a specific user or team". That's perfect....
In context of findings achieved above (I hope), are you keep thinking "App Authentication" is perfect for your case? 🧐
You have correctly noted that "doesn't identify a specific user or team". That means the Application folder will left out untouchable, because it's an account specific thing, NOT application specific (or not only, at lest)! Application authentication is usable in case of processing resources unassigned to any particular account. The example, you provided above, describes process of assigning application to account. At the beginning only application has to be authenticated because it's still not linked to an account and that's why can't do anything account related. Next user confirmation, the example rely on token from that moment on, not to Application authentication only! That's why access to user related data gets possible.
Application authentication is convenient for use in cases like performing actions on public data like shared links, for example. Like a person receiving a link can see it and so on, your application can do the same without user authentication. Accessing link doesn't need user authentication in context of account. If there is any kind of additional authentication set by the link issuer, it can be applied too in borders of Application authentication, like human will do.
Again, inapplicable when any kind of account access is need, even when seems negligible! 😉
Hope this clarifies matter.
- lalomoresHelpful | Level 5
Hi Здравко, thanks for the quick answer!
Your answer makes me think there might be some fundamental missunderstanding/missinterpretation of what an "App folder" is (from my side).
Now, my intentions are to obtain an equivalent effect to that of the long lived token. In my app, that was:
1. My app silently synchronized whatever the Dropbox App Folder had. By synchronize I mean it kept a Mongo table with data about the files names, paths, extensions and created/obtained shared links to each file in the app folder. It did this regularly (say each 15')
2. End users had no idea Dropbox was involved in anyway
3. End users never had to sign in into dropbox. They in fact don't need dropbox accounts to use this app.
4. Whenever an end user searched for a product that had related files (as per their names), they saw the product images or documents (by using the shared links the synchronization made sure exists)
The dropbox App Folder was used to:
- Upload product images
- Upload product documents
This would be done either by the owner of the dropbox account (same that created the app in the app console), or by another Dropbox account which the app folder (or a subfolder) has been shared with.
I hope this better clarifies my context and intentions.
Long lived tokens allowed me to achieve this transparency to the end users.
Is there a way to achieve the same now with the new approach Dropbox is taking?
- Scott-DB
Dropbox Staff
Hi lalomores,
It sounds like your application needs to have indefinite access to only your account and no other account. For that, you should generate a refresh token and use that to create an access token as needed. For more information getting a refresh token, see the /oauth2/token documentation. Refresh tokens can be used indefinitely without manual interaction like long lived tokens.
Also, with app auth, you may only access content which is publicly available (since there is no user or team auth associated with it). So you would need to make a shared link for your folder in order for an app with app auth to access it, otherwise you will need to use user auth with a refresh token.
Hope this helps!
- lalomoresHelpful | Level 5
Thank you very much @serickson
Does the dropbox-sdk-js have a way to obtain the refresh token programmatically without prompting the user? As per your feedback I guess it does, but I'm just not hitting that nail it seems.
From the aforementioned example:
const config = { fetch, clientId: 'jg8wc1hfkvel6ql', clientSecret: 'f0i5w4e6mlbbme5', }; const { Dropbox } = require('dropbox'); // eslint-disable-line import/no-unresolved const dbx = new Dropbox(config);
That way I initialize Dropbox in the server using clientId and clientSecret.
What's next in order to enable this.dbx.filesListFolder ?
I'm a bit tangled up looking and playing with the APIs at https://github.com/dropbox/dropbox-sdk-js/blob/main/src/auth.js
Also, given the context I've mentioned and my app objectives (basically, to use Dropbox as a kind CDN for my app's images), would you advise a better way to use the Dropbox SDK and App folder to achieve my goals?
Thanks a lot.
About Eine Frage stellen
Sie haben Fragen? Richten Sie sie an die Dropbox Community!
Need more support
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 or Facebook.
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!