mirror of
https://github.com/Toumash/mlflow-docker
synced 2025-11-04 15:19:21 +01:00
adds aws demo
This commit is contained in:
19
test-upload.js
Normal file
19
test-upload.js
Normal file
@@ -0,0 +1,19 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user