Fixed JSON mime type for Safari.
rodzic
10b07270ed
commit
d85aed0c58
|
@ -42,6 +42,7 @@ router.post("/", upload, async (req, res) => {
|
||||||
data.format = 'mastodon';
|
data.format = 'mastodon';
|
||||||
break;
|
break;
|
||||||
case 'text/plain':
|
case 'text/plain':
|
||||||
|
case 'application/json':
|
||||||
if (file.originalname.endsWith('.json')){
|
if (file.originalname.endsWith('.json')){
|
||||||
const jsonData = JSON.parse(req.file.buffer.toString());
|
const jsonData = JSON.parse(req.file.buffer.toString());
|
||||||
data.outbox = jsonData;
|
data.outbox = jsonData;
|
||||||
|
|
Ładowanie…
Reference in New Issue