kinpost
Description
Kinpost can upload any files to custom JavaScript (or CSS) forms via kintone REST API.
Installation
npm install --save-dev kinpost
or
yarn add --dev kinpost
Usage
- Append any files to custom JavaScript (or CSS) form, if the same filename exists, overwrite an old file.
- File uploads to Testing Environment. Use
deploy
option, if you need upload to Production Environment.
const kinpost = ; ;
Parameters
name | type | required | default | description |
---|---|---|---|---|
domain | string | yes | Your kintone sub domain name | |
app | number | yes | Target kintone app ID | |
username | string | yes | Login user name | |
password | string | yes | Login user's password | |
files | array | yes | File config list, please see next section | |
deploy | boolean | no | false | Deploy to Production Environment |
File Config
name | type | required | default | description |
---|---|---|---|---|
path | string | yes | Path of the file for upload | |
encoding | string | no | utf-8 | File encoding |
platform | string | no | desktop | Target Platform. desktop or mobile |
type | string | no | js | File type. js or css |
Examples
Upload a sample.js
file to custom JavaScript form for PC.
const kinpost = ; ;
Upload a mobile.js
file to custom JavaScript form for Mobile.
const kinpost = ; ;
Upload a sample.js
file to custom JavaScript form for PC, and global.css
file to custom CSS form for PC.
const kinpost = ; ;
Licence
MIT License.