Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uplink cp does not include S3 Metadata #5424

Open
leszko opened this issue Dec 22, 2022 · 2 comments
Open

Uplink cp does not include S3 Metadata #5424

leszko opened this issue Dec 22, 2022 · 2 comments
Labels
Enhancement New feature or request

Comments

@leszko
Copy link

leszko commented Dec 22, 2022

Description

When the file is uploaded using uplink, it does not contain any metadata.

On the contrary, when the file is uploaded using Web UI or AWS CLI, it includes the Metadata.

Steps to reproduce the issue:

  1. Upload a file using Storj Web UI and check it's metadata.
$ uplink meta get sj://testbucket/video_webui.mp4
{
  "content-type": "application/octet-stream",
  "s3:etag": "85382857f87f612916f22933f51be7a9"
}
  1. Upload a file using AWS CLI and check it's metadata.
$ aws s3 --endpoint=https://gateway.storjshare.io cp video_awscli.mp4 s3://testbucket/
$ uplink meta get sj://testbucket/video_awscli.mp4
{
  "content-type": "video/mp4",
  "s3:etag": "85382857f87f612916f22933f51be7a9"
}
  1. Upload a file using uplink and check it's metadata.
$ uplink cp ~/Downloads/video_uplink.mp4 sj://testbucket/
$ uplink meta get sj://testbucket/video_uplink.mp4
{}

The metadata is missing.

Describe the results you expected:

The metadata should be present while uploading a file using uplink. Or at least the behavior should be consistent between Storj Web UI and the uplink CLI.

Describe the results you received:

There is no metadata when the file is uploaded using uplink.

Your environment

  • Operating system and version: MacOS M1, uplink version v1.9.1-0.20221028140107-e37234d89ffd
  • Additional environment details (Raspberry PI, Docker, VMWare, etc.): N/A
@leszko leszko added the Bug Something isn't working label Dec 22, 2022
@Erikvv
Copy link
Contributor

Erikvv commented Dec 22, 2022

Thanks for your report. It's an interesting request, perhaps we should add a flag to libuplink UploadOptions to do this, like --generate-s3-metadata. I'm not sure it should be default behavior. I do recall this feature is often implemented by calling into system libraries.

@ifraixedes
Copy link
Member

In my personal opinion, it shouldn't be the default behavior because it's related to S3, not to our native protocol, and we should have a flag for not adding it.
It looks more intuitive to me to have a flag to add it rather than having one for removing it.

@ifraixedes ifraixedes added Enhancement New feature or request and removed Bug Something isn't working labels Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

3 participants