You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, it is possible to have an object at key a/../obj inside some bucket. where .. is part of the object key and does not indicate the parent folder as it would on a usual local file system. In other words, on s3 a/../obj != obj where on a local filesystem a/../obj == obj. As well, keys may contain . or "" (empty string) delimited by slashes, akin to having a folder called "." or "". See the examples below.
Normalization of paths in n5 currently treats the following as equivalent:
a/obj
/a/obj
a/./obj
./a/obj
a/b/../obj
././/a/.///obj
but these are all potentially unique keys in an s3 bucket. I don't see a compelling reason to try to make this work right now. Rather, we'll strongly recommend not to use ., .., or `` (empty string) in keys as in the above examples.
touch obj # Make an empty file# Put obj in the bucket root
$ aws s3 cp obj s3://n5-zarr-tests/
upload: ./obj to s3://n5-zarr-tests/obj
# Put obj at the key '/obj'# think: obj is in a folder named "" (empty string) inside the bucket root
$ aws s3 cp obj s3://n5-zarr-tests//
upload: ./obj to s3://n5-zarr-tests//obj
# Put obj at the key './obj'# think: obj is in a folder named "." (dot) inside the bucket root
$ aws s3 cp obj s3://n5-zarr-tests/./
upload: ./obj to s3://n5-zarr-tests/./obj
# S3 not happy
$ aws s3 cp obj s3://n5-zarr-tests/../
upload failed: ./obj to s3://n5-zarr-tests/../obj An error occurred (400) when calling the PutObject operation: Bad Request
# Put obj at the key 'a/../obj'
$ aws s3 cp obj s3://n5-zarr-tests/a/../
upload: ./obj to s3://n5-zarr-tests/a/../obj
# Make keys with two different empty strings
aws s3 cp obj 's3://n5-zarr-tests/a/ /'
aws s3 cp obj 's3://n5-zarr-tests/a/ /'# The results of the above
$ aws s3 ls --recursive s3://n5-zarr-tests
2023-07-03 11:01:13 0 ./obj
2023-07-03 11:01:02 0 /obj
2023-07-03 11:02:36 0 a/ /obj
2023-07-03 11:02:01 0 a/ /obj
2023-07-03 11:01:32 0 a/../obj
2023-07-03 11:00:35 0 obj
The text was updated successfully, but these errors were encountered:
... and that's okay by me.
Object keys names in s3 can be weird.
For example, it is possible to have an object at key
a/../obj
inside some bucket. where..
is part of the object key and does not indicate the parent folder as it would on a usual local file system. In other words, on s3a/../obj != obj
where on a local filesystema/../obj == obj
. As well, keys may contain.
or""
(empty string) delimited by slashes, akin to having a folder called"."
or""
. See the examples below.Normalization of paths in n5 currently treats the following as equivalent:
a/obj
/a/obj
a/./obj
./a/obj
a/b/../obj
././/a/.///obj
but these are all potentially unique keys in an s3 bucket. I don't see a compelling reason to try to make this work right now. Rather, we'll strongly recommend not to use
.
,..
, or `` (empty string) in keys as in the above examples.ping @cmhulbert
The text was updated successfully, but these errors were encountered: