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
When replacing an existing uploaded or linked file in a resource with one with a different format, the format of the previous file is kept. Apart from the inconsistency this is a problem because it affects the views created for the resource, as most view plugins rely on the format to be available or not.
The resource name is also kept, and as this defaults to the file name it is confusing.
Steps to reproduce
Create a resource, upload a test.csv CSV file. The format of the created resource is CSV and the name "test.csv"
Edit this resource, clear the file and upload a PNG. The format and the name are still CSV and test.csv
Expected behavior
I'd expect the metadata to be updated to reflect the actual file being uploaded, ie correct format and name
Additional details
The format file has the if_empty_guess_format validator, which makes sense for new resources (if the user provided their own format, don't overwrite it). But with existing files is more complicated as we need to know if the user has changed the value of format.
I don't think anything on the schema about defaulting to the file name, so I assume this is done in javascript
The text was updated successfully, but these errors were encountered:
CKAN version
Describe the bug
When replacing an existing uploaded or linked file in a resource with one with a different format, the format of the previous file is kept. Apart from the inconsistency this is a problem because it affects the views created for the resource, as most view plugins rely on the format to be available or not.
The resource name is also kept, and as this defaults to the file name it is confusing.
Steps to reproduce
test.csv
CSV file. The format of the created resource is CSV and the name "test.csv"Expected behavior
I'd expect the metadata to be updated to reflect the actual file being uploaded, ie correct format and name
Additional details
if_empty_guess_format
validator, which makes sense for new resources (if the user provided their own format, don't overwrite it). But with existing files is more complicated as we need to know if the user has changed the value of format.The text was updated successfully, but these errors were encountered: