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

Support for setting params like ACL and ContentType #14

Open
blieb opened this issue Apr 16, 2023 · 2 comments
Open

Support for setting params like ACL and ContentType #14

blieb opened this issue Apr 16, 2023 · 2 comments
Labels
help wanted Extra attention is needed new feature New feature or request

Comments

@blieb
Copy link

blieb commented Apr 16, 2023

When uploading a file you at the moment you ca not set params like the ACL and ContentType. at the moment I need to change it manually after but this can be done in 1 request.

@SimonFrings SimonFrings added the question Further information is requested label Jul 13, 2023
@SimonFrings
Copy link
Collaborator

Hey @blieb, good question 👍

When using the write() function to upload your content, it will internally send a HTTP request to your desired target and defines the ContentType header depending on the files extension. For example, if you upload to a users.json file, the content type will be application/json.

This of course doesn't work if the file extension doesn't match the actual content type of your file, in this case you could manually send an HTTP request with the help of reactphp/http. I don't think there are many cases where this should be needed, so I think using the extension for the content type currently works best.

When it comes to ACL, besides sending an HTTP header to set specific permissions, there are currently no other options available. It might be a good idea for the API to incorporate a function that allows for setting specific ACL permissions, but this concept still needs to be explored further. If you need this urgently, you can also reach out to us or help us by becoming as sponsor ❤️

I hope this helps.

I believe this should answer your question, so I will close this ticket for now.

@SimonFrings SimonFrings added new feature New feature or request help wanted Extra attention is needed and removed question Further information is requested labels Jul 14, 2023
@SimonFrings
Copy link
Collaborator

I talked back with @clue and we came to the conclusion that it makes more sense to label this ticket as a "new feature" idea, so I'll reopen this again ^^

@SimonFrings SimonFrings reopened this Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed new feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants