server bugfix
This commit is contained in:
parent
f6f02ebee0
commit
47d14f6fad
2 changed files with 10 additions and 2 deletions
|
|
@ -403,7 +403,7 @@ button {
|
|||
font-size: 12px;
|
||||
}
|
||||
|
||||
.title {
|
||||
.roomsel .title {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
|
|
|
|||
10
server.js
10
server.js
|
|
@ -144,6 +144,8 @@ fastify.post("/entry", async function (request, reply) {
|
|||
let tmpdir = path.dirname(audiofile.filepath);
|
||||
// console.log(audiofile.fields.message.value);
|
||||
|
||||
console.log("hi.");
|
||||
|
||||
//convert to mp3 ?
|
||||
var converted = false;
|
||||
if (path.extname(audiofile.filename) !== ".mp3") {
|
||||
|
|
@ -171,9 +173,13 @@ fastify.post("/entry", async function (request, reply) {
|
|||
// console.log(await fs.readdir(tmpdir));
|
||||
}
|
||||
|
||||
console.log("ok.");
|
||||
|
||||
//upload
|
||||
const client = new Client(server);
|
||||
|
||||
console.log("good.");
|
||||
|
||||
//create unique folder ==> timestamp + uuid
|
||||
const folder = await client.createFolder("Storage/public/sound-parade/" + moment().tz('Asia/Seoul').format('YYYYMMDD-HHmmss-') + uuidv1());
|
||||
if (converted) {
|
||||
|
|
@ -189,7 +195,9 @@ fastify.post("/entry", async function (request, reply) {
|
|||
pass: audiofile.fields.pass.value
|
||||
})));
|
||||
|
||||
//reply.send('done!');
|
||||
console.log("done.");
|
||||
|
||||
reply.send('done!');
|
||||
//reply.redirect('/submit');
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue