view txt file in resources

view txt file in resources

  

Hi,

how do i view text files in resources....?  

Please help.


Hi Dennis NJagi,


you need to view on browser? 


Regards

hi Dennis NJagi,

Go to the Data Section-> Resource Folder-> All the resource files available in your espace will be shown.

Thanks,

MJ

Manish Jawla wrote:

hi Dennis NJagi,

Go to the Data Section-> Resource Folder-> All the resource files available in your espace will be shown.

Thanks,

MJ

Hi.What i ment is i have uploaded so txt.docs in the resources folder and i want to view the .txt file in a screen after i publish the app. How do i do that...
please help.


Hi,

First of all, make sure you've set your resource's "Deploy Action" property to "Deploy to Target Directory". You're then gonna have to download from the Forge and reference in your app the "FileSystem" component (here's the link). You need two actions from that component:

  • "Path_GetApplicationDirectory" to get the server directory your application and resource files were published to.
  • "File_ReadText" to read the content of the text file.

Here's a simple example of how to do that.