feat(ai): 增加llama-swap配置文件生成工具
This commit is contained in:
@@ -77,11 +77,12 @@ export const run_package_batch = async (projects) => {
|
||||
}
|
||||
}
|
||||
|
||||
const upload = async (file_path) => {
|
||||
export const upload = async (file_path) => {
|
||||
let start = new Date().getTime()
|
||||
let basename = path.basename(file_path)
|
||||
let response = await spinner(
|
||||
`Uploading project ${file_path}`,
|
||||
() => fetch(`${upload_url}/file/upload/${path.basename(file_path)}`, {
|
||||
() => fetch(`${upload_url}/file/upload/${basename}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/octet-stream',
|
||||
@@ -98,6 +99,7 @@ const upload = async (file_path) => {
|
||||
console.log(`✅ Finished upload ${file_path} (${millisecondToString((new Date().getTime()) - start)})`)
|
||||
console.log(`📘 Uploaded ${fileSize(fs.statSync(file_path).size)}`)
|
||||
console.log(`📘 MD5 ${md5file.sync(file_path)}`)
|
||||
console.log(`📘 Download curl http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.124:36800/file/download/${basename} -o ${basename}`)
|
||||
fs.rmSync(file_path)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user