USEPA / EPA_Non-geo_Metadata_Editor

3 stars 0 forks source link

Infer mediatype from URL #43

Closed torrin47 closed 5 years ago

torrin47 commented 6 years ago

If a URL has an optional mediatype element associated with it, the editor should check the end of the URL for a file extension that matches the list of mediatypes, and if it matches one, it should default to that value.

jzichichi commented 6 years ago

Appears to be working for me. For example, if I enter http://test.csv, csv is selected, same for .html, same for .txt. Moving for @torrin47 to test.

torrin47 commented 6 years ago

Looks good - only implemented on Download URL for now? Will also need it on describedBy inside and outside of distribution.

Also has me wondering about our MIME type domain. Maybe that should be a separate ticket.

aergul commented 6 years ago

Implemented for describedBy elements as well now