diff --git a/src/index.ts b/src/index.ts index 7703e70..92394e5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -146,26 +146,6 @@ media.get('/thumbnail/:serverName/:mediaId', async (ctx) => { } }); -media.post('/upload', async (ctx) => { - for (let retry = 0; retry < 15; retry += 1) { - const res = await got.post(`${DEST_SERVER}/_matrix/media/r0/upload`, { - body: ctx.body, - headers: { - authorization: ctx.headers['authorization'], - 'content-type': ctx.headers['content-type'], - }, - responseType: 'buffer', - }); - if (res.statusCode === 200) { - ctx.res.statusCode = 200; - ctx.res.setHeader('content-type', 'application/json'); - ctx.res.write(res.body); - ctx.res.end(); - return; - } - } -}); - router.use('/media/r0', media.routes(), media.allowedMethods()); router.all('/:idc+', async (ctx) => {