I am presently working on a C#.net Web Application which supports file uploads to the server by users. I am using an external WhatsApp API which needs to access these files using a URL. So, I am wondering as to what URL should I pass to the API so that it can access files on the server.
Will the URL be something like: base_url/file_path/file_name?
Also, what changes will I have to make in the route configuration file for the same (because, presently the default url pattern is base_url/controller/action)
Based on the above discussion, i can see 'DocumentMessage' is the model where its asking. I have 2 ways to handle. you can pick any based on your system design.
Solution:- Create a Virtual path under your root directory. So your api/ website will be hosted under some domain(https://example.com) . So your Virtual directory path will be something like (https://example.com/fileLocation). So your entire file path will be published under this link. so for your File the path will be https://abc.or/fileLocation/file_Data
Note:- Disable the Directory access for your security purpose. Without fail
Reference:- For IIS Virtual Path For Azure App service