Hi all
I added FileExplorer to my web application, I am using "OnClientItemSelected" client event to get the selected file path as follows:
and I am using the value of imgPath to save the path in TextBox and later I save it in the database.
The issue is that the value is such like this
/MyWebsite/Images/Icons/01.png
assume that I am now running the web application on:
http://localhost/MyWebstie
and later I will run it on: [http://myserver/Website] or [http://www.mysite.com], so the file name will not be valid because it originally saved with [/MyWebsite].. I need a way to get the file name without [/MyWebsite]
(Splitting the path and removing [/MyWebsite] from it is not accepted because I may run the server on [http://localhost] directly and then move it to [http://www.mysite.com/myApplication])
I know that I must determine the domain before but I don't know where the application will run...
Thank you
I added FileExplorer to my web application, I am using "OnClientItemSelected" client event to get the selected file path as follows:
var imgPath; |
function OnClientItemSelected(sender, args) { |
var imageSrc = args.get_path(); |
imgPath = imageSrc; |
... |
... |
... |
} |
and I am using the value of imgPath to save the path in TextBox and later I save it in the database.
The issue is that the value is such like this
/MyWebsite/Images/Icons/01.png
assume that I am now running the web application on:
http://localhost/MyWebstie
and later I will run it on: [http://myserver/Website] or [http://www.mysite.com], so the file name will not be valid because it originally saved with [/MyWebsite].. I need a way to get the file name without [/MyWebsite]
(Splitting the path and removing [/MyWebsite] from it is not accepted because I may run the server on [http://localhost] directly and then move it to [http://www.mysite.com/myApplication])
I know that I must determine the domain before but I don't know where the application will run...
Thank you