put the proper extension on downloaded bpmn and dmn files w/ burnettk cullerton
This commit is contained in:
parent
30c8c7c122
commit
74d5b4acd4
|
@ -341,14 +341,18 @@ export default function ReactDiagramEditor({
|
|||
const file = new Blob([xmlObject.xml], {
|
||||
type: 'application/xml',
|
||||
});
|
||||
let downloadFileName = fileName;
|
||||
if (!downloadFileName) {
|
||||
downloadFileName = `${processModelId}.${diagramType}`;
|
||||
}
|
||||
element.href = URL.createObjectURL(file);
|
||||
element.download = `${processModelId}.bpmn`;
|
||||
element.download = downloadFileName;
|
||||
document.body.appendChild(element);
|
||||
element.click();
|
||||
});
|
||||
};
|
||||
|
||||
const saveButton = () => {
|
||||
const userActionOptions = () => {
|
||||
if (diagramType !== 'readonly') {
|
||||
return (
|
||||
<>
|
||||
|
@ -362,5 +366,5 @@ export default function ReactDiagramEditor({
|
|||
return null;
|
||||
};
|
||||
|
||||
return <div>{saveButton()}</div>;
|
||||
return <div>{userActionOptions()}</div>;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue