-
Notifications
You must be signed in to change notification settings - Fork 36
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
broken resource url/file size scripts #1079
Conversation
please use vscode, pycharm or some editor that lints your python code for you, there are lots pep8 problems here like spaces missing around Commit messages are important too, just 60 characters or so about what this change does to help make sense of our |
Here's how I think this should work:
We can feed script # 1 with a command like |
looking good just a few comments. Please assume each comment applies to all files below it (I didn't bother repeating at each location) |
the content-type returned from a web server is not reliable because it gets ignored by users. Can you collect the file type from the Content-Disposition |
'MOV', 'MPEG', 'MPEG-1', 'MP3', 'MXD', 'NetCDF', 'ODP', 'ODS', 'ODT', 'PDF', 'PDF/A-1', 'PDF/A-2', | ||
'PDF/UA', 'PNG', 'PPT', 'PPTX', 'RDF', 'TTL', 'NT', 'RDFa', 'RSS', 'RTF', 'SAR', 'SAV', 'SEGY', 'SHP', | ||
'SQL', 'SQLITE3', 'SQLITE', 'SVG', 'TIFF', 'TRIG', 'TRIX', 'TFW', 'TXT', 'VPF', 'WAV', 'WCS', 'WFS', | ||
'WMS', 'WMTS', 'WMV', 'WPS', 'XML', 'XLS', 'XLSM', 'XLSX', 'ZIP', 'other'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this duplicates a list from the metadata schema. Is it necessary to check against this? If so can you reference the one in ckanext/canada/schemas/presets.yaml instead?
@wardi The headers returned from each request do not contain content-disposition. Here's an example of what is returned: |
No description provided.