iscreen-log-uploader
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

log-uploader

Upload iscreen projects log click a button

Install

yarn add iscreen-log-uploader

Usage

import { createUploader } from 'iscreen-log-uploader'

const options = {
  logPath: '/Users/savokiss/Documents/audios',
  ossUrl: 'http://api-server.mofaxiao.com/aliyun/oss/sts_token',
  ossType: 'interaction-audio'
}

const uploader = createUploader(options)

uploader.init()

const record = {
  name: 'log.log',
  date: '2019-09-17',
  liveLessonId: 1111,
  teachLessonId: 2222
}

uploader.on('debug', (...args) => {
  console.log(...args)
})

uploader.on('upload-success', url => {
  console.log('url', url)
})

// init 成功后才能调用 upload 方法
setTimeout(() => {
  uploader.upload(record)
}, 5000)

Readme

Keywords

none

Package Sidebar

Install

npm i iscreen-log-uploader

Weekly Downloads

2

Version

0.1.2

License

ISC

Unpacked Size

10.2 kB

Total Files

11

Last publish

Collaborators

  • mofaxiao