Change the filename of an attached diagram file in Confluence Data Center and Server

Note: You can change the title of a diagram in a page from the draw.io diagram macro settings.

The diagram title is displayed when you hover over a diagram in view mode, if the toolbar is displayed at the top (in the draw.io Macro Settings for that diagram).
Change the title of the draw.io diagram in the macro settings in Confluence Data Center and Server

However, if you want to rename the filename of the attachments, follow the steps below.

Change the filename of a draw.io diagram attachment

Confluence doesn’t easily allow you to rename attachments that are used within macros. You can manually rename the two attachment files and edit the source of the Confluence page with a free app.

  1. On the page that contains the diagram file you want to rename, click on the three dots ... in the page menu, then select Attachments.
    Open the page attachments on Confluence Server
  2. Click on Properties to the right of the draw.io diagram file you want to rename.
    Edit the properties of the PNG and diagram file
  3. Enter a new File Name in the text field, then click Save.
    Rename the draw.io diagram file attachment in Confluence Server
  4. Repeat the steps above for the .png image file. Make sure the file name before the file extension matches the diagram file exactly so Confluence knows which preview to display.
    The diagram file and the image file names much match when renaming files attached to a page in Confluence Server
  5. Return to view the page. The macro in the page now needs to be edited to display the new files. Edit the Confluence page.
    Edit the Confluence page after you have renamed the attachments
  6. Use a free tool, such as Confluence source editor app, and edit the source. With this app, click < > in the toolbar on the right to edit the page source.
    Edit the source of the Confluence page
  7. Find the diagramName parameter, and change the file name inside the tag to be the new file name, minus its file extension, then click Apply.
    Change the file name in the page source to rename a draw.io diagram

If the draw.io diagram is embedded on another page in your Confluence instance or on this page multiple times, you must update each macro in the page source to use the new file name.