Forum Discussion
_anomDiebolt_
8 years agoQrew Elite
It is very simple to do from the browser without any other external services or costs.
You will need to obtain an ACCESS_TOKEN from dropbox by registering a new app and answering a few simple questions.
https://www.dropbox.com/developers/apps/create
You must keep this ACCESS_TOKEN secret as it is the key to the account's dropbox kingdom. Oftentimes bearer tokens like this are not used client side as they could leak or be stolen but there are ways to configure things so that if you have trusted QuickBase users you can extend that trust to using Dropbox via a code page in QuickBase.
That said here is a simple HTML page that will upload a selected file to dropbox
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=611
You will note that this simple form has a file input whereas you want to upload a report from QuickBase. This is of no consequence as using JavaScript you can easily create a File out of anything using an object called a Blob. In practical terms this means you can use just about any information to build a Blob suitable for representing your file and passing it to the Dropbox API to upload as a file. This "File from Nothing" has been used several times in other answers in this forum. It is a point I don't think most users understand but you can create a file in code from anything and you don't need to have a file attachment or code page as the source of your file. I your case the file (ie Blob) would simply be built from the response of an API call that was formatted as CSV.
I just used the page to upload a text and pdf file without problems and as soon as I did so I received a notification to my desktop. There are a few open issues such as where the file lands in your Dropbox which I have not tried yet but I would not imagine it is difficult to control.
If you need further help with this problem fee free to contact me through the information in my profile:
https://getsatisfaction.com/people/dandiebolt
You will need to obtain an ACCESS_TOKEN from dropbox by registering a new app and answering a few simple questions.
https://www.dropbox.com/developers/apps/create
You must keep this ACCESS_TOKEN secret as it is the key to the account's dropbox kingdom. Oftentimes bearer tokens like this are not used client side as they could leak or be stolen but there are ways to configure things so that if you have trusted QuickBase users you can extend that trust to using Dropbox via a code page in QuickBase.
That said here is a simple HTML page that will upload a selected file to dropbox
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=611
You will note that this simple form has a file input whereas you want to upload a report from QuickBase. This is of no consequence as using JavaScript you can easily create a File out of anything using an object called a Blob. In practical terms this means you can use just about any information to build a Blob suitable for representing your file and passing it to the Dropbox API to upload as a file. This "File from Nothing" has been used several times in other answers in this forum. It is a point I don't think most users understand but you can create a file in code from anything and you don't need to have a file attachment or code page as the source of your file. I your case the file (ie Blob) would simply be built from the response of an API call that was formatted as CSV.
I just used the page to upload a text and pdf file without problems and as soon as I did so I received a notification to my desktop. There are a few open issues such as where the file lands in your Dropbox which I have not tried yet but I would not imagine it is difficult to control.
If you need further help with this problem fee free to contact me through the information in my profile:
https://getsatisfaction.com/people/dandiebolt
_anomDiebolt_
8 years agoQrew Elite
Also Helpful:
How to Get Your Dropbox API Access Token
http://99rabbits.com/get-dropbox-access-token/
How to Get Your Dropbox API Access Token
http://99rabbits.com/get-dropbox-access-token/