Using Dropbox for JavaScript customization

Introduction

Debugging JavaScript files on kintone isn't that simple, as every time you need to make changes to your JavaScript file, you will need to re-upload them to the kintone app.

This article introduces how to use Dropbox as a way to sync local JavaScript files on your desktop with kintone, without the need of manually uploading files every time you make changes. 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 you can do this, of which one is explained in this Dropbox help page.

    If the below is your 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://www.dropbox.com/s/a1b2c3d4ef5gh6/kintone.js?dl=1
        or
        https://dl.dropbox.com/s/a1b2c3d4ef5gh6/kintone.js 

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

 

Syncing the files

Once the connection is set up, kintone will reference the JavaScript file in your Dropbox account. JavaScript files that are edited and saved locally on your desktop will be automatically synced to Dropbox, that will be read by kintone. When debugging, the changed contents in your local script will be reflected immediately. Note that the kintone app will read JavaScript files when a page loads, so make sure to refresh your page when you have made changes to your 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.

 

Keeping that in mind - happy kintone scripting!

Was this article helpful?
0 out of 0 found this helpful
Comments
Please sign in to leave a comment.