I’ve got a RESTful WCF service that acts as a file store. Since there can be any number of directories and sub-directories, I’m trying to let the users access them by simply putting the file path into the URL. Is there a way I can do this without requiring the user to encode the slashes?
For example, what I want is a URI template of Files/{path} that can be accessed like http://localhost:8000/Files/folder1/subfolder2/subfolder3/file.jpg.
You can put a * at the end of your uri template. Inside your operation you can interpret the rest of the uri that matches to * as your file path.