Commit 1be63d23 authored by Yunhua Koglin's avatar Yunhua Koglin
Browse files

add prefix

parent d8d1b7ed
......@@ -12,5 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = '2.0.10'
__version__ = '2.0.2'
......@@ -217,9 +217,9 @@ class AwsStorage(BlobStorageBase):
await self.getCredentials(tenant)
bucket = tenant.bucket_name
object_name = f"{bucket}/{object_name}"
encoded_object_name = quote(object_name, safe='')
# encoded_object_name = quote(object_name, safe='')
print("delete: object_name \n\n")
print("delete_object_name_in_storage: \n\n")
print(object_name)
s3_client = boto3.client(
......@@ -231,7 +231,7 @@ class AwsStorage(BlobStorageBase):
)
response = s3_client.delete_object(
Bucket=self._bucket_name,
Key=encoded_object_name
Key=object_name
)
return response
......@@ -300,14 +300,15 @@ class AwsStorage(BlobStorageBase):
kwargs = {'Bucket': self._bucket_name}
if prefix is not None:
prefix_name = prefix_name+prefix
prefix_name = f"{bucket}/{prefix}"
if max_result is not None:
kwargs['MaxKeys'] = max_result
kwargs['Prefix'] = prefix_name
print("list_objects, prefix is \n\n")
print(prefix)
print("list_objects_prefix_is \n\n")
print(prefix_name)
print("end_list_objects\n\n")
s3_client = boto3.client(
's3',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment