We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

Colloding A.'s avatar
Colloding A.
New member | Level 1
10 years ago

How to display text file content saved on account?

Hey I'm building an text editor web-app using php. So basically I want to display the content of a text file on a text editor that is already saved on the application's filespace.

My question is do I have to download the file to a local folder and read its content from there or is there another way to directly read files saved on DropBox?

1 Reply

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    Exactly how this works will depend on what library/SDK you're using, if any.

    For example, if you're using the official PHP Core SDK, you would use the getFile method to access the file content. That method writes the data out to a resource that you provide, and what you do with that is up to you. E.g., you could save it to a local file, or directly use or display the data elsewhere.

    Or, if you're using one of the HTTP endpoints directly, e.g., the /files/download endpoint for API v2, the data is returned directly in the response body, at which point you can likewise do with it whatever you'd like.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 9 months ago
411 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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!