Fixed share/download object regression (#1296)

* Fixed share/download object regression
* Adding tests for computeObjectURLWithoutEncode function

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
Lenin Alevski
2021-12-06 13:49:13 -08:00
committed by GitHub
parent 569d2390b9
commit 3ce0b3d633
4 changed files with 115 additions and 12 deletions

View File

@@ -661,7 +661,7 @@ const ListObjects = ({
uploadUrl = `${uploadUrl}?prefix=${encodedPath}`;
}
const identity = btoa(
const identity = encodeFileName(
`${bucketName}-${encodedPath}-${new Date().getTime()}-${Math.random()}`
);
@@ -754,7 +754,7 @@ const ListObjects = ({
};
const downloadObject = (object: BucketObject | RewindObject) => {
const identityDownload = btoa(
const identityDownload = encodeFileName(
`${bucketName}-${object.name}-${new Date().getTime()}-${Math.random()}`
);

View File

@@ -391,7 +391,7 @@ const ObjectDetails = ({
};
const downloadObject = (object: IFileInfo) => {
const identityDownload = btoa(
const identityDownload = encodeFileName(
`${bucketName}-${object.name}-${new Date().getTime()}-${Math.random()}`
);