Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,816
Community Members
 
Community Events
168
Community Groups

Changing mime type of a file does not enable preview

v7.8.3 on Linux, with a Linux web client.

When I upload 'file.sh' (a text shell script) to an attachments page, the mime type is set to "application/octet-stream" and the file cannot be previewed. If I change the mime type to "text/plain" and rename the file to 'file.txt' I still cannot preview it.

Conversely if I upload 'file.txt' (the same file) the mime type is set to 'text/plain' and I can preview it, even if I rename the file and change the mime type.

The old mime type appears to be preserved somewhere for the life of the file, and it is that type that controls the preview-ability of the file. Is there a way to reset this type so that the file can be previewed?

1 answer

0 votes
WW Rising Star Aug 26, 2022

<stepping up on soapbox>

Please put content into Confluence pages. Confluence is not a file repository.

<stepping off of soapbox>

If your intent is to view the contents of the file, it'd be a whole lot nicer to just copy and paste the contents into a Code Block macro. There you can do things like specify the language, add line numbers, make it collapsible, and name the thing.

If you must, you can also upload the file to have a copy of it.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Watch 4 Confluence apps compete for Best App Demo in September's Appy Hours

Calling all collaborators! Appy Hours on the Atlassian Community is a monthly event where 4 Partner and app vendor presenters go head-to-head with 5-minute demos for the title of Best App Demo. I...

486 views 0 12
Read article

Atlassian Community Events