You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
ozdev
5 years agoExplorer | Level 4
Unable to retrieve preview for CSV file
Hey All.
I'm attempting to fetch an HTML preview for a CSV file using the `/get_preview` endpoint. Unfortunately I'm receiving back an `unsupported_extension` error. Maybe my understanding is wrong? Appreciate any suggestions.
Reviewed the following documentation:
Dropbox `get_preview` Documentation
Curl request using 'get_preview' resulting in error:
vagrant@vagrant:$ curl -X POST https://content.dropboxapi.com/2/files/get_preview \ --header "Authorization: Bearer [truncated]" \ --header "Dropbox-API-Arg: {\"path\": \"/items/24157/18365.catalog-items.csv\"}" {"error_summary": "unsupported_extension/", "error": {".tag": "unsupported_extension"}}
Curl request using 'download' resulting in success:
vagrant@vagrant:$ curl -X POST https://content.dropboxapi.com/2/files/download \ --header "Authorization: Bearer [truncated]" \ --header "Dropbox-API-Arg: {\"path\": \"/items/24157/18365.catalog-items.csv\"}" "created_at", "currency", "description", "discountable", "id", "metadata", "name", "object", "taxable", "taxes", "type", "unit_cost" {...} "1546048185", "usd", "Overpayment on order after adjustments", "", "overpayment-reconciliation", "", "OVERPAYMENT RECONCILIATION", "catalog_item", "", "", "", "0"
My understanding is that the API should return HTML data when requesting CSV files from the 'get_preview' endpoint.
Thanks in advance.
- Greg-DBDropbox Staff
Thanks for the report! This looks like a bug on our side. We're looking into it and I'll let you know when we have an update on it.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,915 PostsLatest Activity: 19 hours agoIf 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 or Facebook.
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!