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

API doc is missing possible values for PutObject.options #841

Closed
deekoder opened this issue Oct 11, 2017 · 5 comments
Closed

API doc is missing possible values for PutObject.options #841

deekoder opened this issue Oct 11, 2017 · 5 comments

Comments

@deekoder
Copy link
Contributor

We need to list all possible contentType values in the minio.PutObjectOptions. As a consumer of api its not clear why i have to set minio.PutObjectOptions. Can it be inferred?

contentType := "application/zip"

// Upload the zip file with FPutObject
n, err := minioClient.FPutObject(bucketName, objectName, filePath, minio.PutObjectOptions{ContentType:contentType})
@deekoder deekoder added this to the Current milestone Oct 11, 2017
@deekoder
Copy link
Contributor Author

objInfo, err := minioClient.StatObject("mybucket", "photo.jpg", GetObjectOptions{})
if err != nil {
    fmt.Println(err)
    return
}
fmt.Println(objInfo)

here we dont have to say minio.GetObjectOptions{}

@deekoder
Copy link
Contributor Author

Same for minio.NewArn and minio.NewNotificationConfig

@harshavardhana
Copy link
Member

List of broken docs

API.md:object, err := minioClient.GetObject("mybucket", "photo.jpg", GetObjectOptions{})
API.md:err := minioClient.FGetObject("mybucket", "photo.jpg", "/tmp/photo.jpg", GetObjectOptions{})
API.md:object, err := minioClient.GetObjectWithContext(ctx, "mybucket", "photo.jpg", GetObjectOptions{})
API.md:err := minioClient.FGetObjectWithContext(ctx, "mybucket", "photo.jpg", "/tmp/photo.jpg", GetObjectOptions{})
API.md:err = minioClient.FGetEncryptedObject("mybucket", "photo.jpg", "/tmp/photo.jpg", cbcMaterials)
API.md:n, err := minioClient.PutObject("mybucket", "myobject", file, fileStat.Size(), PutObjectOptions{ContentType:"application/octet-stream"})
API.md:n, err := minioClient.PutObjectWithContext(ctx, "mybucket", "myobject", file, fileStat.Size(), PutObjectOptions{ContentType:"application/octet-stream"})
API.md:n, err := minioClient.FPutObject("mybucket", "myobject.csv", "/tmp/otherobject.csv", PutObjectOptions{ContentType:"application/csv"})
API.md:n, err := minioClient.FPutObjectWithContext(ctx, "mybucket", "myobject.csv", "/tmp/otherobject.csv", PutObjectOptions{ContentType:"application/csv"})
API.md:objInfo, err := minioClient.StatObject("mybucket", "photo.jpg", GetObjectOptions{})
API.md:cbcMaterials, err := NewCBCSecureMaterials(key)
API.md:fileStat, err := fileReader.Stat()
API.md:fileStat, err := fileReader.Stat()
API.md:src := NewSourceInfo("bucket", "object", nil)
API.md:decKey := NewSSEKey([]byte{1,2,3}, "")
API.md:src := NewSourceInfo("bucket", "object", decKey)
API.md:dst, err := NewDestinationInfo("bucket", "object", nil, nil)
API.md:encKey := NewSSEKey([]byte{1,2,3}, "")
API.md:dst, err := NewDecryptionInfo("bucket", "object", encKey, nil)
API.md:cbcMaterials, err := NewCBCSecureMaterials(key)
API.md:key, err := NewAssymetricKey(privateKey, publicKey)
API.md:cbcMaterials, err := NewCBCSecureMaterials(key)
API.md:key, err := NewAssymetricKey(privateKey, publicKey)
API.md:cbcMaterials, err := NewCBCSecureMaterials(key)
API.md:keyInfo := NewSSEInfo([]byte{1,2,3}, "")
API.md:expiry := time.Second * 24 * 60 * 60 // 1 day.
API.md:topicArn := NewArn("aws", "sns", "us-east-1", "804605494417", "PhotoUpdate")
API.md:topicConfig := NewNotificationConfig(topicArn)
API.md:bucketNotification := BucketNotification{}

@krisis
Copy link
Member

krisis commented Oct 23, 2017

@deekoder #851 fixes this issue. Can we close the issue?

@harshavardhana
Copy link
Member

This is fixed after multiple PRs were merged closing

#851
#850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants