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

Show default_effects in file info of group info response #208

Open
Tracked by #212
rsedykh opened this issue Oct 12, 2023 · 2 comments
Open
Tracked by #212

Show default_effects in file info of group info response #208

rsedykh opened this issue Oct 12, 2023 · 2 comments
Assignees
Labels

Comments

@rsedykh
Copy link
Member

rsedykh commented Oct 12, 2023

Files can be added to the group with some CDN operations. File info in group info shows this operations separately from UUID.

image

https://uploadcare.com/api-refs/rest-api/v0.7.0/#tag/Group/operation/groupInfo
https://uploadcare.com/api-refs/upload-api/#tag/Groups/operation/filesGroupInfo

p.s. Don't forget to update uploadcare-php-example if necessary.

@rsedykh rsedykh added the api label Oct 20, 2023
@andrew72ru andrew72ru mentioned this issue Nov 5, 2023
8 tasks
@andrew72ru
Copy link
Collaborator

default_effects
This set is applied by default when the file is referred via a group CDN URL and the /nth/N/ operator.

It makes absolutely no sense in the case of the PHP library because the library does not use the "file is referred via a group CDN URL" call at all.
Plus, the FileInfoInterface is the same in the case of group requests and the case of file requests. It means the defultEffects property in any File request will be empty — which is bad because this is ambiguous behaviour.
— Why do I see it in a group but not in a file? — this question will be the first one from any developer.

If the File has the defultEffects property, this property should be set on the file and should be returned as the result of a request to this file (not only for the group).
If the Group has the defultEffects property, this property should be part of the Group response, not the File one.

Another issue: the PHP library can't send the "Create Group" request with something like b1026315-8116-4632-8364-607e64fca723/-/resize/x800/ inside because this is a not valid UUID.

My proposition here is:

  • Modify Uploadcare API (on the Uploadcare side) to pay respect to the consistency of data structures and to have the default_effects property in any File response;
  • And only then modify the PHP library to:
    • show this property on file response;
    • have a possibility to send UUIDs with effects modificators.

@andrew72ru
Copy link
Collaborator

@rsedykh

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

No branches or pull requests

2 participants