1. Steve Mason
  2. PowerServer Mobile (Obsolete)
  3. Thursday, 12 October 2017 23:45 PM UTC

I am using the universal version of Appeon Powerbuilder 2017.

The Powerserver documentation ("FAQ & Workarounds - What files will go to the plugin folder...") states "For each Appeon application, a "plugin" folder will be created automatically under the application directory (so called sandbox on the mobile device and so called cache directory on the Web client) to store any external files created or used by the application"

When I run the following code in a mobile app the program displays a message that the file exists.  But, the file is not in the application's plugin directory on the server.  How can a mobile app write to a file in a directory on the server?  

int li_fileid
int li_rc
string ls_file = 'Testfile.txt'
li_fileid = fileopen (ls_file, linemode!, write!)
li_rc = FileWrite (li_fileid, 'This is a test')
if fileexists(ls_file) then
    messagebox(ls_file, 'file exists')
    messagebox(ls_file, 'file does not exist')
end if


Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 13 October 2017 14:08 PM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 1

HI Steve;

  If you want to write a file to the IIS / PowerServer location, I would recommend doing that by using a PB based Web Service (WS) that also runs on the same platform. The WS would have access to the server's file system when called from either the Appeon Mobile or Appeon Web client.

Note: For your mobile device's "cache" location, please have a look at the of_getcachedir method.

Regards ... Chris


  1. Marco Meoni
  2. Friday, 13 October 2017 21:31 PM UTC
Hi Chris,

FYI the WS cannot write on a precise path.

Any file function will work on a temporary session-based folder that cannot be referenced by Appeon applications.



  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 16 October 2017 13:42 PM UTC
Hi Marco;

   FYI:  With my WS framework - yes, you can. 

Regards ... Chris

  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Friday, 13 October 2017 13:54 PM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 2

the PB file read/write functions are for client side files, they do not upload anything.

read up on the AppeonFileService object to upload files to the server

other options would be to store files as blobs in the database, or use a 3rd party api webservice such as AWS / AZURE to store the files 


There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.