You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
689 B
20 lines
689 B
|
|
const autoUpdate = require ("./AutoUpdateSdkMain");
|
|
const path = require("path");
|
|
const fs = require("fs");
|
|
const axios = require('axios');
|
|
const downloadFile = require("../../utils/DownloadFile");
|
|
|
|
//推送素材更新方法
|
|
const pushMaterial = async (ctx, next) => {
|
|
const buffer = await downloadFile.downloadFileToBuffer("https://7z-data.oss-cn-shenzhen.aliyuncs.com/render/custom/09/82/6052742231/h6j0lixqyk9niq8.bin");
|
|
console.log("buffer", buffer);
|
|
fs.writeFileSync('./yyyyyyyy.bin', buffer);
|
|
const req = ctx.query.req;
|
|
console.log('req', req);
|
|
autoUpdate.readArgvs(req);
|
|
};
|
|
|
|
const materialAutoUpdate = module.exports = {
|
|
pushMaterial: pushMaterial
|
|
};
|
|
|