Upload Files
The Upload User File async node allows you to upload files.
Input Parameters
URL
The URL to your server, including the directory where the PHP scripts are located.
Access Token Client
What you entered in $accessTokenClient in the settings.php file.
File Path
Directory including the file to be uploaded.
Directory Type
Game directory: This is your project directory. That is, where the Content directory is located.
Absolute directory: Here, you need to specify the full directory path. On Windows, that would be something like D:\MyDirectory\test.png
User ID
The user ID is used to enforce permissions for user files. If possible, it should be a unique ID that identifies a specific user.
Something like a Steam ID works very well. You might also want to salt it to be on the safe side.
In the demo, I simply used the user directory since it isn't that important in the demo.
Directory Token
This token specifies the directory to which the file will be uploaded.
Json Data
A JSON string can be stored here (optional). The JSON should be valid and contain no errors.
Output Parameters
On Success
It will be fired once all files have been uploaded without errors.
On Error
An event is triggered when something goes wrong.
On Upload Progress
It is triggered during the upload in order to be able to show the progress.
File Token
The token assigned to the file.
File Path
The path, including the file, so that it can be associated with the upload.
Progress
Returns the upload progress as a percentage.
Average Speed in Mbit
Returns the average upload speed in Mbit/sec.
Error Code / Error Message
Returns an error code and a corresponding message. Most error messages can be found in the PHP files.
Standard HTTP errors, such as 404, might also be returned here.