Skip to content

Commit

Permalink
Merge pull request #1558 from girder/yaml-mimetype
Browse files Browse the repository at this point in the history
Use the new official yaml mime-type of application/yaml
  • Loading branch information
manthey authored Jun 26, 2024
2 parents 7997428 + e58c35a commit d9982a3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@

### Changes
- Work with newer python-mapnik ([#1550](../../pull/1550))
- Use the new official yaml mime-type of application/yaml ([#1558](../../pull/1558))

### Bug Fixes
- Fix an issue emitting rectangles in geojson ([#1552](../../pull/1552))
- Fix an issue writing zarr channel meatdata ([#1557](../../pull/1557))

## 1.29.0

Expand Down
6 changes: 4 additions & 2 deletions girder/girder_large_image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ def handleFileSave(event):
for mimeType, ext, std in [
('text/yaml', '.yaml', True),
('text/yaml', '.yml', True),
('application/yaml', '.yaml', True),
('application/yaml', '.yml', True),
('application/vnd.geo+json', '.geojson', True),
]:
if ext not in mimetypes.types_map:
Expand Down Expand Up @@ -499,14 +501,14 @@ def yamlConfigFileWrite(folder, name, user, yaml_config):
item = Item().createItem(name, user, folder, reuseExisting=True)
existingFiles = list(Item().childFiles(item))
if (len(existingFiles) == 1 and
existingFiles[0]['mimeType'] == 'text/yaml' and
existingFiles[0]['mimeType'] == 'application/yaml' and
existingFiles[0]['name'] == name):
upload = Upload().createUploadToFile(
existingFiles[0], user, size=len(yaml_config))
else:
upload = Upload().createUpload(
user, name, 'item', item, size=len(yaml_config),
mimeType='text/yaml', save=True)
mimeType='application/yaml', save=True)
newfile = Upload().handleChunk(upload, yaml_config)
with _configWriteLock:
for entry in list(Item().childFiles(item)):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ const Formats = {
Formats['application/vnd.geo+json'] = Formats['application/json'];
Formats['text/x-yaml'] = Formats['text/yaml'];
Formats['application/x-yaml'] = Formats['text/yaml'];
Formats['application/yaml'] = Formats['text/yaml'];

function lintGirderIni(text, callback) {
return restRequest({
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ include =
utilities/converter/*
utilities/tasks*
parallel = True
core = sysmon

[coverage:html]
directory = build/test/artifacts/python_coverage
Expand Down

0 comments on commit d9982a3

Please sign in to comment.