File transfer
Quobis wac support the sharing of files between users of the platform. This functionality is also referred to as “file transfer” or “file upload” in the documentation. This service is not tied in any way to the messaging service as it does not uses XMPP protocol. Nevertheless, application developers usually include the file transfer functionality within the chat functionality, but this is not mandatory at all.
Configuration
This functionality is provided from the sippo-server
service as an internal service and has some configuration options mostly for security reasons. In order to make use of it, administrators need to initialize the service at config/wac.ini
as with any other sippo-server
service.
These are the main parameters that need to be configured:
address
: the IP address to bind the service to. Defaults to 127.0.0.1port
: the TCP port where the websocket will listen on. Defaults to 5678uploadDir
: where to store temporary uploaded files. Defaults to /tmp/sfuploads, will be created if missingchunkSize
: the size (in bytes) of the chunks a file will be splitted into. Defaults to 10240.allowedExtensions
: array of string that refers mime type of allowed extensions. Default is empty array, which means “accept every file”. Available since v4.1maxFileSize
: bytes of max file size. Default value is 40MB. If undefined or zero, means no size limit. Available since v4.1filenameLengthLimit
: max number of characters allowed. Default value is 40MB. Available since v4.1
An example of this configuration is shown below (please note that the section name is “fileupload”):
[fileupload]
address = 127.0.0.1
port = 5678
uploadDir = /tmp/sfuploads
chunkSize = 10240
allowedExtensions[] = image/jpeg
allowedExtensions[] = image/png
maxFileSize = 4194304
filenameLengthLimit = 40
If the user tries to upload a filetype which is not in the allowed extensions list, or that exceeds the maxFileSize or the filenameLenght, the application will thrown an specific error towards the SDK so the application developer can inform the end user.