oracle / oracle/oci-cli

object store `put` does not obey `content-disposition` option for multipart uploads

Open
#483 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Object Storage
Dominant language
Python
Stars
669
Forks
236
Avg merge
1m
Merged PRs (30d)
4

Description

How to reproduce:
Upload something small:

oci os object put --bucket-name BUCKET --file SOME_FILE_BELOW_128MB --name SOME_NAME --content-disposition attachment --force --region us-ashburn-1 --content-type 'text/plain'

Get the headers of that file:

curl -I https://objectstorage.us-ashburn-1.oraclecloud.com/...   
HTTP/1.1 200 OK
accept-ranges: bytes
...headers omitted...
content-disposition: attachment

This look s fine.
Now upload a large file:

oci os object put --bucket-name BUCKET --file SOME_FILE_ABOVE_128MB --name SOME_NAME --content-disposition attachment --force --region us-ashburn-1 --content-type 'text/plain'

Get the headers of that file:

curl -I https://objectstorage.us-ashburn-1.oraclecloud.com/...   
HTTP/1.1 200 OK
accept-ranges: bytes
... content-disposition is missing!

I am currently working around the issue by adding --no-multipart option to the oci command line, but this is obviously not ideal.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the oci os object put command and trace how --content-disposition is handled when multipart upload is selected; compare it with the --no-multipart path. Reproduce the issue with files below and above 128 MB, then verify that both uploads include the content-disposition header.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.