Is there an In-Process API call I can use to get physical path of the file which I uploaded in centralized file storage ?
Is there an In-Process API call I can use to get physical path of the file which I uploaded in centralized file storage ?
What is the purpose of needing it? Generally physical paths should be irrelevant and you should not really need or uses a physical path as its contrary to what CFS is designed to be.
Hi Patrick,
Actually I needed file bytes which I have uploaded in the centralized file storage,
After I uploaded a file here, I can able to get the URL and using the URL I am able to get the file file bytes with the following code.
WebClient webClient = new WebClient();
byte[] uploadeFileBytes = webClient.DownloadData("Uploaded file URL")
But its not working when I try do this in the Initialize() method of a plugin.
I am able to get this done by giving the physical path of the file. so that I am looking for physical path of the file.
Can you please let me know If this is write or else how can I get the file bytes in the Initialize() method?
Hi Patrick,
Actually I needed file bytes which I have uploaded in the centralized file storage,
After I uploaded a file here, I can able to get the URL and using the URL I am able to get the file file bytes with the following code.
WebClient webClient = new WebClient();
byte[] uploadeFileBytes = webClient.DownloadData("Uploaded file URL")
But its not working when I try do this in the Initialize() method of a plugin.
I am able to get this done by giving the physical path of the file. so that I am looking for physical path of the file.
Can you please let me know If this is write or else how can I get the file bytes in the Initialize() method?
You should use The Cfs In-Process Api
Cfs In-Process API Service
This will give you a readable stream you can then turn into a byte array if you need something other than a stream.
The same options are available via the CentralizedFileStorage API
community.telligent.com/.../cfs-in-process-api-service