Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Want to improve this question? Update the question so it focuses on one problem only by editing this post .

Closed 3 years ago .

I need to fetch data from HttpContext.Request in my custom middleware to provide public url for application assets.

How can you get StoreName & FilePath from this path:

http://example.com/api/fileService/storage/{StoreName}/{path/to/file}

This case needs new route template? I'm student, sorry for newbie question.

i'm unsure of what you are asking? do you have a string called StoreName and another with a filepath? do you need to create a url path after concatenating those into a new url string? string url = $" example.com/api/fileService/storage {StoreName}/{path/to/file}". you can make extension methods that does this, and then use HtmlEncoder, etc. But i'm not sure what you're asking Johan Herstad Oct 7, 2019 at 7:19