mirror of
https://github.com/Toumash/mlflow-docker
synced 2025-12-22 04:59:30 +01:00
19 lines
518 B
JavaScript
19 lines
518 B
JavaScript
const fs = require('fs')
|
|
const path = require('path')
|
|
const uploadFile = require('./aws')
|
|
|
|
const testUpload = () => {
|
|
const filePath = path.resolve(__dirname, 'test_upload.webp')
|
|
const fileStream = fs.createReadStream(filePath)
|
|
const now = new Date()
|
|
const fileName = `test-image-${now.toISOString()}.jpg`
|
|
uploadFile(fileStream, fileName).then((response) => {
|
|
console.log(":)")
|
|
console.log(response)
|
|
}).catch((err) => {
|
|
console.log(":|")
|
|
console.log(err)
|
|
})
|
|
}
|
|
|
|
testUpload() |