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
Describe the bug
Updating an uploaded resource file through API does not update the resource's size field
Steps to reproduce
Steps to reproduce the behavior:
Create a dataset and a file upload resource
Observe the resource's size field value
Change the file through the UI
Observe the resource's size field value changes as it should
Use the action API to upload a new file with resource_patch (or resource_update, I assume)
Observe the resource's size field value stays the same
Expected behavior
The file size should reflect the uploaded file regardless of the method used to upload it
Additional details
I assume this is because the resource already has a size field when resource_update calls package_update, which assumes it is already set to the correct value. In resource_create the size is set, but resource_update just keeps the same value as before. Thus the new file size is not set.
The text was updated successfully, but these errors were encountered:
CKAN version
2.9.5, probably others
Describe the bug
Updating an uploaded resource file through API does not update the resource's
size
fieldSteps to reproduce
Steps to reproduce the behavior:
size
field valuesize
field value changes as it shouldresource_patch
(orresource_update
, I assume)size
field value stays the sameExpected behavior
The file size should reflect the uploaded file regardless of the method used to upload it
Additional details
I assume this is because the resource already has a
size
field whenresource_update
callspackage_update
, which assumes it is already set to the correct value. Inresource_create
the size is set, butresource_update
just keeps the same value as before. Thus the new file size is not set.The text was updated successfully, but these errors were encountered: