We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
yurib
10 years agoHelpful | Level 5
Saving a file with a custom extension
I need to save a file with a custom defined extension (e.g. test.nc). How can I do that using the Dropbox saver?
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.
6 Replies
- Greg-DB10 years ago
Dropbox Community Moderator
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'}, ... - yurib10 years agoHelpful | Level 5
Hello Greg,
I 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-DB10 years ago
Dropbox Community Moderator
Can you share the code to reproduce that issue? Thanks in advance! - yurib10 years agoHelpful | Level 5
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-DB10 years ago
Dropbox Community Moderator
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 - yurib10 years agoHelpful | Level 5
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.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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, Facebook or Instagram.
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!