[MGNLUI-8425] Import as yaml fails on Windows Created: 06/Oct/23  Updated: 27/Nov/23  Resolved: 14/Nov/23

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2.39
Fix Version/s: 6.3.0, 6.2.41

Type: Bug Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Adam Siska
Resolution: Fixed Votes: 3
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 0.5h Time Spent: 0.5h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Problem/Incident
causality
caused by MGNLUI-6536 Upload dialog should allow only conte... Closed
duplicate
is duplicated by MAGNOLIA-9127 Import of existing resource in Webapp... Closed
relation
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLUI-8529 QA & close Sub-task Closed Quach Hao Thien  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Story Points: 1
Team: Nucleus
Work Started:
Approved:
Yes

 Description   

Steps to reproduce

  1. Go to demo and open Pages-app
  2. Create a page and export it (by default, it is a yaml file)
  3. Remove the page
  4. Try to import the page
  5. Check it fails with the message "An unsupported upload file type"

Expected results

The page can be imported

Actual results

The upload is aborted and the message "An unsupported upload file type" is displayed

Workaround

  • comment out this line: import.yaml#6, (link into resources app)
  • (or) export it as XML

Development notes

When removing the allowedMimeTypePattern restriction from the dialog we found the upload to detect the file as application/octet-stream



 Comments   
Comment by Richard Gange [ 06/Nov/23 ]

I think one option here is to have a fallback mechanism based on the extension. We do have the mime mapping registry /server/MIMEMapping/x-yaml@extension. However it does seem like a bug within the upload field itself.

Generated at Mon Feb 12 09:55:03 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.