tcms-file-upload1

0.1.3 • Public • Published

tcms-file-upload

用于CMS静态文件发布

上传一个文件到 TCMS 静态池(素材库)

项目来源https://github.com/TOMG-FE/tcms-file-upload

Getting Started

 
var upload = require('tcms-file-upload');
 
upload({
    cookie : 'YOUR COOKIE',
    file : '/local/test/static.js',
    path : '2011/tabliang/test'
}, function(err){
    if(err){
        console.log(err);
    }else{
        console.log('Upload success');
    }
});
 

选项列表

options.file

Type: String

Default: ''

本地文件的绝对路径

options.cookie

Type: String

Default: ''

TCMS 系统登录 cookie

options.path

Type: String

Default: '2015/tabliang/temp'

指定上传到的目录。(前缀路径: "http://mat1.gtimg.com/" + (cookie 中定义的项目名称) + "/")

options.overwrite

Type: String

Default: 0

是否允许覆盖,0为允许,1为不允许

Release History

  • 2015-12-22 v0.1.3 回显信息输出上传文件的线上地址。
  • 2015-11-27 v0.1.2 实现上传文件时自动创建文件路径。
  • 2015-11-27 v0.1.1 更换项目管理人。
  • 2015-11-26 v0.1.0 第一个正式版本。

Readme

Keywords

none

Package Sidebar

Install

npm i tcms-file-upload1

Weekly Downloads

3

Version

0.1.3

License

MIT

Last publish

Collaborators

  • aslinwang