Using Dropbox for JavaScript customization

Introduction

Debugging JavaScript files on Kintone isn't so simple, as every time a change needs to be made to the JavaScript file, it will need to be re-uploaded to the Kintone app.

This article introduces how to use Dropbox as a way to sync local JavaScript files on the desktop with Kintone, without the need of manually uploading files every time a change is made. This tip is really handy for debugging scripts on Kintone.

Setting up the Dropbox connection

  1. Obtain a Dropbox account from the Dropbox website.

  2. Download and install the Dropbox client program, so that local files can be synced with Dropbox.

  3. Create a JavaScript file on Dropbox.

  4. Obtain the file share link of the JavaScript File
    For information on how to obtain this link, refer to the Dropbox help page for Shared folders.
    dropbox1.PNG

  5. Convert the Dropbox link to a direct download link. There are two ways to do this, one of which is explained in this Dropbox help page.

    If the below is the Dropbox share link:
        https://www.dropbox.com/s/a1b2c3d4ef5gh6/kintone.js 

    Change it to the below form to convert it into a direct download link:
        https://dl.dropbox.com/s/a1b2c3d4ef5gh6/kintone.js 

  6. Specify the direct download link URL in the JavaScript and CSS customization settings, and update the Kintone App settings.
    dropbox2.PNG

 

Syncing the files

Once the connection is set up, Kintone will reference the JavaScript file in the Dropbox account. JavaScript files that are edited and saved locally on the desktop will be automatically synced to Dropbox, that will be read by Kintone. When debugging, the changed contents in the local script will be reflected immediately. Note that the Kintone app will read JavaScript files when a page loads, so make sure to refresh the page when a change has been made to the JavaScript file. 

Finally

This article introduced a tip for efficient debugging. Note that JavaScript files that are shared with Dropbox are published on the web, and can potentially be accessed by anyone. Please understand the risks before using this method, and note that it is not recommended to use online storage services during operation.

Was this article helpful?
3 out of 3 found this helpful
Do you have any questions or issues related to this article?
Please share your views with us in the Community forums!