Experiment : Web API Document Download of HTML File Resulting in a 404

Certified Lead Developer

I am experimenting with the Web API Document Download template. I have a very simple HTML document that contains a <p>Hello World</p> in the body. I have customized the template such that I can reference the HTML document by name, i.e. index.html. I can confirm that it finds the correct document and when using the Web API test console it results in a 200. When I open the URL in new browser tab it returns me a 404. I have also confirmed that if I use the standard Document Download template and provide the document id instead it works loading the HTML page inline and displaying the Hello World text as expected.

There is no obvious reason that I can think of why this behaviour is occurring. Perhaps Appian Cloud is intercepting this "kind of thing" and routing it to a 404?

Any direction would be appreciated.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Aaron Swerdlow-Freed

    Hi Aaron,

    I get the following when I click on the URL provided in the test console.

    The response headers are all correct, i.e. Content-Type: text/html, Content-Disposition: inline; filename="index.html".

    What I have tried now is removing the .html from the URL and resolving that to the html document on Appian. This retrieves the HTML document and displays the HTML correctly, i.e. Hello World. Even if I change the extension to .abc it works fine. It is only happening on certain file extensions before it even gets to the Web API expression. So the Appian web server is definitely catching these and returning 404.

    I assume this is being applied as an added security measure.

Children