cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right 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: 

Exception in 2/files/download: "unsupported_file"

Exception in 2/files/download: "unsupported_file"

sanjeev_hansanur
Explorer | Level 4

We are trying read content of paper file, getting below exception

com.dropbox.core.v2.files.DownloadErrorException: Exception in 2/files/download: "unsupported_file"
at com.dropbox.core.v2.files.DbxUserFilesRequests.download(DbxUserFilesRequests.java:1278)
at com.dropbox.core.v2.files.DbxUserFilesRequests.download(DbxUserFilesRequests.java:1297)
at com.amazonaws.kendra.connector.dropbox.model.item.PocInputStreamToString.main(PocInputStreamToString.java:36)

 

Below is code we are using 

 

DbxDownloader dbxDownloader= client.files().download("/First Paper.paper");
// Metadata metadata=client.files().getMetadata("/document.docx");
InputStream inputStream= dbxDownloader.getInputStream();
DataInputStream dataInputStream = new DataInputStream(inputStream);
String tmp;
StringBuilder inputLine=new StringBuilder();
while ((tmp = dataInputStream.readLine()) != null) {
inputLine.append(tmp);
//System.out.println(tmp);
}

System.out.println("File content--->"+inputLine.toString());
7 Replies 7

sanjeev_hansanur
Explorer | Level 4

Similarly we are facing issue for docx,paperT and shortCut

Greg-DB
Dropbox Staff

The "unsupported_file" error means:

This file type cannot be downloaded directly; use DbxUserFilesRequests.export(String) instead.

You can find more information in the documentation linked there.

mansi2821
Explorer | Level 4

is there any updates i am facing the same issue

Здравко
Legendary | Level 20

@mansi2821 wrote:

is there any updates i am facing the same issue


Hi @mansi2821,

What you mean "the same issue"? 🤔 Have you meet some file you can neither export nor download? What is this file type, if any, and what you are seeing on the corresponding metadata (is the file marked as downloadable there)? 🧐

mansi2821
Explorer | Level 4

hy @Здравко 

 

What i meant is i have paper doc in my dropbox account and when i try to download those documents using dropboxClient.Files.DownloadAsync()

i am facing error 

 

System.AggregateException: One or more errors occurred. ---> Dropbox.Api.ApiException`1[Dropbox.Api.Files.DownloadError]: unsupported_file/..
at Dropbox.Api.DropboxRequestHandler.<Dropbox-Api-Stone-ITransport-SendDownloadRequestAsync>d__15`3.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at InfinniumDropBoxConsumer.Business.InfinniumDropBoxConsumer.DownloadFile(DocumentDetailFromConnector documentDetail, Boolean dataInsight, DateTime modifiedDate, Int32 retry)
---> (Inner Exception #0) Dropbox.Api.ApiException`1[Dropbox.Api.Files.DownloadError]: unsupported_file/..
at Dropbox.Api.DropboxRequestHandler.<Dropbox-Api-Stone-ITransport-SendDownloadRequestAsync>d__15`3.MoveNext(); Request Id: eda9da2f079140abbcf8c81f907debd9<---

 

is there a way i can download these documents 

Здравко
Legendary | Level 20

@mansi2821 wrote:

...

is there a way i can download these documents 


You didn't post particular file metadata, but file type, you're referring to, is not usually downloadable, so:

Direct download - No.

Export - Yes. 😉

Greg-DB
Dropbox Staff

@mansi2821 I see you've also posted this in a new thread, so I'll follow up with you there.

 

For future reference, please note it is not necessary to post the same question in multiple threads.

Need more support?
Who's talking

Top contributors to this post

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