How to serve HTML from Stash with the correct mime-type?

Is there a mode in Stash to serve HTML files repsecting their mime-type? We used to use WebSVN, which had this feature, which meant we could save the doxygen output into source control, and then browse it from within our source control viewer.

Something like how you can append &raw to the URL...

2 answers

1 accepted

Hi Kevin,

I may have been a bit hasty. You might be interested in the following feature request, which you should cast a vote on:

https://jira.atlassian.com/browse/STASH-4099

Cheers,

Charles

Thanks for the tip

Hi Kevin,

I've got the bare essentials of a plugin if you're still interested:

https://bitbucket.org/cofarrell/stash-website-plugin

Still needs a link from Stash, at the moment you need to hard-code the URL.

Charles

Thank you! I really appreciate this, got it up and running already. Let me know if you have further updates.

Hi Kevin,

Unfortunately not. Stash uses a common Atlassian HTTP library to handle raw files, and in the case of html files we intentially set the content disposition to 'attachment' to avoid any potential XSS attacks.

It wouldn't be hard to write a simple plugin that serves up html files with the correct headers, but it's unlikely something Stash will do.

Cheers,

Charles

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

638 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot