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

Kevin Dixon November 7, 2013

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

0 votes
Answer accepted
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 14, 2014

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

Kevin Dixon January 14, 2014

Thanks for the tip

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2014

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

Kevin Dixon February 2, 2014

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

0 votes
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2013

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 Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events