diff --git a/src/routes-simple/minio/get-minio-resource.ts b/src/routes-simple/minio/get-minio-resource.ts index cfce8be..b82ca16 100644 --- a/src/routes-simple/minio/get-minio-resource.ts +++ b/src/routes-simple/minio/get-minio-resource.ts @@ -97,7 +97,6 @@ export const authMinio = async (req: IncomingMessage, res: ServerResponse, objec etag, 'last-modified': lastModified, 'Content-Disposition': contentDisposition, - 'file-name': filename, ...filteredMetaData, }); const objectStream = await minioClient.getObject(bucketName, objectName); diff --git a/src/routes-simple/resources/get-resources.ts b/src/routes-simple/resources/get-resources.ts index bda6b8f..cefee5c 100644 --- a/src/routes-simple/resources/get-resources.ts +++ b/src/routes-simple/resources/get-resources.ts @@ -5,7 +5,8 @@ router.all('/api/s1/share/*splat', async (req, res) => { try { const url = req.url; const _url = new URL(url || '', 'http://localhost'); - const objectName = _url.pathname.replace('/api/s1/share/', ''); + let objectName = _url.pathname.replace('/api/s1/share/', ''); + objectName = decodeURIComponent(objectName); await authMinio(req, res, objectName); } catch (e) { console.log('get share resource error url', req.url);