cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

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

Highlighted

read choosed file cotent

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
Highlighted

Re: read choosed file cotent

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! 

Lusil
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
Still stuck? Ask me a question!
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
Highlighted

Re: read choosed file cotent

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! 

Lusil
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
Still stuck? Ask me a question!
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

Highlighted

Re: read choosed file cotent

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. 

Highlighted

Re: read choosed file cotent

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

Highlighted

Re: read choosed file cotent

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. 

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?