cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn about how Kev uses Dropbox to make sure he keeps track of all the new music he listens to? Check out his tips 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: 

read choosed file cotent

read choosed file cotent

haider197
New member | Level 2

i'm using dropbox chooser , it works well for me , but i want to read the choosed file cotent and put it in a textarea , i'm using the piece of code 

$.get(files[0].link, function (data) {

console.log(data); // <-- this will log the contents of the file

});

but i'm getting an unclear text ,

NOTE:the file extension is docx .

 

1 Accepted Solution

Accepted Solutions

Re: read choosed file cotent

Lusil
Dropboxer
Hey @haider197, I moved your post here, where some like-minded users will have some ideas to share with you. 
 
In the meantime, could you also send us a screenshot (without any personal info) of the behavior you’re experiencing so as to have a better visual understanding?
 
Thanks in advance! :grin:

Lusil
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
:arrows_counterclockwise: Still stuck? Ask me a question!
:pushpin: Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

View solution in original post

4 Replies 4

Re: read choosed file cotent

Lusil
Dropboxer
Hey @haider197, I moved your post here, where some like-minded users will have some ideas to share with you. 
 
In the meantime, could you also send us a screenshot (without any personal info) of the behavior you’re experiencing so as to have a better visual understanding?
 
Thanks in advance! :grin:

Lusil
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
:arrows_counterclockwise: Still stuck? Ask me a question!
:pushpin: Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

Re: read choosed file cotent

Greg-DB
Dropboxer

It sounds like you're using the Dropbox Chooser with a "direct" link type to access the file data for the chosen file. 

I see that you already have the Chooser part working, and you're able to retrieve the file data from the returned link. What you do with the data from there is up to you, but note that the Dropbox link will just return the raw data for the chosen file. 

In this case, that will be the raw .docx file data. The .docx file format isn't plain text though, so it won't be directly human readable. You may need to use some third party library for reading the docx format and getting out whatever information you're looking for. 

Re: read choosed file cotent

haider197
New member | Level 2

sssss.png

what i want to do is :

* the  user select a file from his own dropbox (it's done ), once the file is loaded , its content will be dispalyed in the textarea 

note : I accidentally hit the mark as resolve button

Re: read choosed file cotent

Greg-DB
Dropboxer

It sounds like your question is more about general web programming than anything specific to Dropbox, so I'm afraid I can't be too helpful. You may be better helped on a general web programming forum.

So far, I see you are able to retrieve the data from the link. From there you may need to interpret or convert that data (e.g., since it's a docx in this case), and then use JavaScript to update that textarea to display the desired content. 

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    haider197 New member | Level 2
  • User avatar
    Lusil Dropboxer
What do Dropbox user levels mean?
Need more support?