upload file
1.0.0
使用element-ui的upload組件實現上傳圖片至七牛雲
4.0
以上(建議使用nvm 來管理node版本)npm install
8080
npm start
npm run nodemon
code
附註:啟動專案前先將accessKey、secretKey、bucketName等參數替換成七牛為您提供的對應參數
介面請求方式
# request url
curl --request GET
--url ' http://localhost:8080/api/upload?fileName=123.png '
# body
{
" code " : " 1 " ,
" desc " : " ok " ,
" result " : {
" bucketName " : " bucket-name " ,
" fileName " : " f90bad3c937d1dcdfc37.png " ,
" uploadToken " : " JjO_ih1JuNJAKDT-cr5T10TSuBGyJf1 "
}
}
註:具體文件��參考element-ui upload�