1. Home
  2. Docs
  3. UniREST Solution 3.5
  4. UniREST Client
  5. Online Files

Online Files

Starting from version 2.0, the UniREST Solution can work with files stored in your Server. The UniRESTClient class offers various tools to make this operation easy, fast and very practical:

ClassDescription
UniRESTClient.FileA class for managing files in your Server. You can save, load, and delete files.
UniRESTClient.DownloadA class for download any kind of file from your Server into your Game.
UniRESTClient.UploadA class for upload any kind of file from your Game into your Server.
A mention goes to the UniRESTBinary class which can be very useful in managing files (see the ''UniREST Binary'' paragraph ).

Files location

Files in your Server have to be placed somewhere. The File, Upload, and Download classes can transfer data in two locations:

Game FolderThe Game Folder is a special folder inside the UNIREST system folder. This folder is meant to be used directly by your Unity Game, so it should contain files related to your Game Project or Application.
When you send data to this file you can specify additional subfolders: they will be automatically created if they don’t exist.
User folderEach user has a dedicated folder where to keep its own files. This folder is linked to the user ID and it’s meant to be used when the user is logged-in, for collecting the user’s file.

For the download process, you can also specify a direct HTTP(s) link.

Limits

When your work with files (especially when you send data streams to your Server), you must consider two kinds of limits you may run into:

Resources limits

These are the limits from the hardware characteristics of your Server or the device where your Game is running. For example:

  • disk space
  • memory
  • internet speed and bandwidth

Server’s PHP limits

Since the whole UniREST Server engine is developed in PHP, data streams are always subject to the limits imposed by the PHP configuration.
Before sending any kind of data to your Server, you should check your PHP.ini settings. For example, if parameters like post_max_size and upload_max_filesize can limit the size of transferred data.

Articles