Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

How can i get the resources path in Controller? #4663


User avatar
0
legatoteam created

How can i get the resources path in Controller? For example, i need the path string of image folder


1 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    Just create a public method in Controller and send simple string like in ProfileController.cs As you see the path is being sent with a string.

    private FileResult GetDefaultProfilePicture()
            {
                return File(
                    @"Common\Images\default-profile-picture.png",
                    MimeTypeNames.ImagePng
                );
            }