You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Files can be added to the group with some CDN operations. File info in group info shows this operations separately from UUID.
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.
The text was updated successfully, but these errors were encountered: