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

Implement Upload API #380

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YigeZhu
Copy link
Contributor

@YigeZhu YigeZhu commented Jul 25, 2022

Summary:

  • Add an upload_file API to storage service.
  • Add an optional metadata param to upload APIs in all relevant interfaces. Most cloud providers support metadata param in their upload APIs, so it should be a fairly generic feature.

Some rationales behind these changes:

  • Since object metadata is a generic feature provided by cloud providers, it makes sense to enable it in storage servic e layer
  • It does not really make sense to add object metadata in the copy API, because we normally don't expect the files to be changed during copying
  • So I'm adding a new upload_file to support this. We should be calling this API directly if we are specifically uploading files from local to the storage service.

reference: relevant boto3 docs for metadata

Differential Revision: D38120426

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Jul 25, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D38120426

Summary:
Pull Request resolved: facebookresearch#380

* Add an `upload_file` API to storage service.
* Add an optional metadata param to upload APIs in all relevant interfaces. Most cloud providers support metadata param in their upload APIs, so it should be a fairly generic feature.

Some rationales behind these changes:
* Since object metadata is a generic feature provided by cloud providers, it makes sense to enable it in storage servic e layer
* It does not really make sense to add object metadata in the `copy` API, because we normally don't expect the files to be changed during copying
* So I'm adding a new upload_file to support this. We should be calling this API directly if we are specifically uploading files from local to the storage service.

reference: relevant [boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-uploading-files.html) for metadata

**Next Step**: enable upload api with checksum associated with a file

Differential Revision: D38120426

fbshipit-source-id: 2e86ec3083b7d1d7d9b7193d937f16b2cd510492
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D38120426

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants