Add a ".txt" extension and upload to confluence. For example if you file is "exampleSQL.sql" then rename to "exampleSQL.sql.txt". When you would like to use the file download and remove "txt".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Tor Brondbo- Let me clarify. You asked a question how to view SQL files that you attach to Confluence to be viewable like TXT files for example. I gave you one one the solutions (workarounds) to achieve that, so that you can preview file without downloading it. Simply treat it as a text file (which .sql files are just with different extension). This is how I understand your question. If you do not like that solution or it is not answering your question that is completely fine. Here on Community people ask questions and there are not always 100% perfect solutions or suggestions. Sometimes those do not simply exist. I gave you an idea, maybe someone else have their own solution (and will post it) and if you like it better you can later "Accept as a solution" that is next to every reply. Thanks to that we can gratuitously share ideas with each other . If you pay for maintenance you can go directly with your questions to Atlassian support or create an improvement/suggestions request on https://jira.atlassian.com/ if the feature do not exist in current version of the application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, I didn't, I asked a question about how to get preview of .sql files attached to Confluence, i.e. files with the extension '.sql'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, in that case you cannot (using standard OOTB functions without any plugin or workaround). Some time ago it was not even possible to preview .txt files... People would like to also have a preview of , js, .java, .ods, .msg, .html .. you would like to have .sql but this is not currently supported (only - JPEG /DOC/PDF/PNG/DOCX/TIFF/PPT/PSD/PPTX/WMF/XLS/EMF/XLSX/ICO/ICNS)
For others users that would like to see the workaround that I propose in action, this is how preview looks in Confluence. I hope it helps someone.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've found that if you edit the Properties of the attachment and set the mime type to 'text/plain', then via the attachments view (click the paper clip icon at the top above the page title) then when you click on the item it will preview as a text file. Note this still does not make it work via the main page links.
We were able to use the Attachment macro and added file comments to the files and it works well enough.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is not working for me at all. I fully expected this to work the second I saw the "New Content Type" with a MIME specification in it. However, it still says it cannot preview.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did this on 6 .sql attachments where I had this issue. After a little while (not sure if time is needed), when I click on them from the attachments display, 3 of them display as text, while the other three still say they can't preview. I can't determine anything different between the ones where it worked and those where it did not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.