cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Saving a file with a custom extension

Saving a file with a custom extension

yurib
Helpful | Level 5
Go to solution

I need to save a file with a custom defined extension (e.g. test.nc). How can I do that using the Dropbox saver?

1 Accepted Solution

Accepted Solutions

yurib
Helpful | Level 5
Go to solution

Apparently, there was a problem with my host configuration. I added MIME types that I need and everything works. So no problem with Dropbox API. It was my fault. Sorry for that.

View solution in original post

6 Replies 6

Greg-DB
Dropbox Staff
Go to solution

If you're using the Saver via an <a> tag, you can set the "data-filename" attribute on that tag to be the filename, including extension, you want the Saver to use, like this:

 

<a href="URL_HERE" data-filename="filename.ext" class="dropbox-saver"></a>

 

If you're using the JavaScript interface, you can set the filename, including extension, in the "filename" value for the file the files list in the options you supply to the createSaveButton or save method, like this:

 

var options = {
    files: [
        // You can specify up to 100 files.
        {'url': 'URL_HERE', 'filename': 'filename.ext'},
...

 

 

yurib
Helpful | Level 5
Go to solution

Hello Greg,

use the JavaScript interface from a server and of course I set the filename, including extension, in the "filename" value for the file in the files list in the options. When I set the filename with extension .txt it works fine. But if I set extension .obj which I need to use the Dropbox fails to save and returns an error: "Job reached maximum retry attempts"

Greg-DB
Dropbox Staff
Go to solution
Can you share the code to reproduce that issue? Thanks in advance!

yurib
Helpful | Level 5
Go to solution

My code looks like your Dropbox Saver sample. In url field I put url of my host with file name including extension at the end. In file name field I put name again with extension. If file has extension .txt everything is fine. But if I change the file extension to .obj  Dropbox is not able to save the file and returns the error that I mentioned in the last post "Job reached maximum retry attempts".

Greg-DB
Dropbox Staff
Go to solution
This issue doesn't reproduce for me using the sample code and a specified filename that ends in .obj. That being the case, it sounds like it may specific to the URL(s) you're using, so please share that so we can reproduce it and investigate.

If you'd prefer to share it privately, you can do so by opening a ticket here:

https://www.dropbox.com/developers/contact

yurib
Helpful | Level 5
Go to solution

Apparently, there was a problem with my host configuration. I added MIME types that I need and everything works. So no problem with Dropbox API. It was my fault. Sorry for that.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    yurib Helpful | Level 5
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?