One of the tricky things app developers need to deal with occasionally is serving static files which users may have uploaded or you have generated (e.g. resized image thumbnails or generated documents).

You could just serve these files straight from your web server but in many cases this may tie up a web process while your client downloads the file.

With the new X-Viaduct-Send-File header you can remove the need to serve these files yourself and let our proxies handle it for you. This not only cuts down on the number of web processes you need to run, it also adds a significant speed boost when serving the files.

Amazing. How do I use it?

To use it, instead of sending the data from the file you wish to serve, just include a header named X-Viaduct-Send-File which includes the path to the file and don't send a body. You'll still need to send your Content-Disposition and Content-Type headers as normal so clients know how to handle the incoming file.

If you have any issues, you can have a read of our troubleshooting documentation which explains how to track down any possible issues.

Is this secure?

It's just as secure as sending the data yourself. As your application is in control of actually sending the request, it can decide who should be able to access files and when.

Does it cost anything?

No. There are no extra charges for using this service. You may even be able to save money because you may not need to run as many web processes.

Questions?

Just give us a shout and we'll be happy to help.

Tell us how you feel about this post?