Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
OwnerId,FirstName,LastName,MailingStreet,MailingCity,MailingState,MailingPostalCode,MailingCountry,Phone,RecordTypeId,Email,Campaign,IF_Local_Leader__c
005A0000001EHjd,jan 16 test for ACTON,kumar,,,,,,,012A0000000K4y8IAC,Test10@gmail.com,701q0000000K2Us,TRUE
005A0000001EHjd,Jan 16 If local check,Kumat,,,,,,,012A0000000K4y8IAC,testiflocal@gmail.com,701q0000000K2Us,TRUE
005A0000001EHjd,gowtham,test,,,,,,,012A0000000K4y8IAC,testacton123@gmail.com,701q0000000K2Us,TRUE
I have a CSV file with headers/fields as like above
but when i preview/open the file in the dropbox it is coming in different format?
like
{"type":"Buffer","data":[79,119,110,101,114,73,100,44,70,105,114,115,116,78,97,109,101,44,76,97,115,116,78,97,109,101,44,77,97,105,108,105,110,103,83,116,114,101,101,116,44,77,97,105,108,105,110,103,67,105,116,121,44,77,97,105,108,105,110,103]
scenario is like this?
1. I used dropbox API to connect from Nodejs.
2. successfully connected.
3. stored a file in Apps folder.
4. created a folder there.
5. drop some files(csv files) in that.
6. but when i try to open the csv files the format is completely changed ..
it is giving like
types: buffer
data: [,,,,,,]
....
Please hlep on this.
Thanks .
My sdk version 1.3.14
My code is given below, here am reading my local csv file and passing that value to the dropbox.
i.e, upload a csv file to dropbox.
var node_dropbox = require('node-dropbox');
var fs = require('fs');
var api = node_dropbox.api('<REDACTED>'); //my access token
var f = '/Users/saikiran/Downloads/ifg_localleader_contacts.csv'; // my local csv file
fs.readFile(f, function (err, data) {
if (err) { throw err; }
api.createFile('12.csv',data, function(err, res) {
console.log(err);
});
});
I've redacted the access token in your previous post, but since it was visible for some time, you should really disable that access token to make sure no one else can access your account.
I believe the bug is in the node-dropbox library, which is written by a third-party. This line seems suspect: https://github.com/g33kidd/node-dropbox/blob/master/lib/node_dropbox.js#L96. I believe setting json to true means that the requests library attempts to JSON-serialize your Buffer. I would recommend setting that to false instead.
Note also that this library appears to still use API v1, which has been deprecated and is due to be fully turned off in June: https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/. You might prefer to use the official Dropbox JavaScript SDK, which uses API v2: https://github.com/dropbox/dropbox-sdk-js.
Thanks Steve.
My issue is resolved with using dbox module in node.
Thanks for your time.
Hi there!
If you need more help you can view your support options (expected response time for a 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!