It would be cool to be able to work with versioned objects.
Already working:
Not working:
-
list all objects versions
almost works: s3.listObjects(undefined, undefined, undefined, { versions: true }) returns an empty response, but that's an easy fix (just add a different top level xml object name)
-
restoring old version by
-
copying
no way to pass versionId query param
theoretically it could be passed like s3.copyObject('file.jpg?versionId=123', 'file.jpg') (doesn't work now because it gets escaped), but it's probably better to go the opts object route
-
removing specific version
It would be cool to be able to work with [versioned objects](https://docs.aws.amazon.com/AmazonS3/latest/userguide/manage-objects-versioned-bucket.html).
Already working:
- [get version id on upload](https://docs.aws.amazon.com/AmazonS3/latest/userguide/AddingObjectstoVersioningEnabledBuckets.html)
can be read from `response.headers['x-amz-version-id']`
- [get object by version id](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RetrievingObjectVersions.html)
`s3.getObject('file.jpg', { versionId: '123' })`
Not working:
- [list all objects versions](https://docs.aws.amazon.com/AmazonS3/latest/userguide/list-obj-version-enabled-bucket.html)
almost works: `s3.listObjects(undefined, undefined, undefined, { versions: true })` returns an empty response, but that's an easy fix (just add a different top level xml object name)
- [restoring old version](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RestoringPreviousVersions.html) by
- [copying](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html#AmazonS3-CopyObject-request-header-CopySource)
no way to pass `versionId` query param
theoretically it could be passed like `s3.copyObject('file.jpg?versionId=123', 'file.jpg')` (doesn't work now because it gets escaped), but it's probably better to go the `opts` object route
- removing specific version
- [single](https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectVersions.html)
no way to pass `versionId` query param
- [bulk](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html#API_DeleteObjects_RequestSyntax)
no way to pass `<VersionId>` prop to xml