Comment on page
When building applications you need to have the ability to store files in your applications. The WEM modeler has a place for that in the Templates, Widgets, Files and Hyperlinks tab of the resource pane (
). Here you find a folder called Files.
There are no restriction on the type of file you want to add. When a file is added the modeler checks the extension and the first lines of the mimetype to verify how to handle the file.
There is a restriction on the file size of <30MB. If someone tries to upload a file larger than 30 MB, the load balancer will kill the connection and show a "413 Request Entity Too Large" message. When you want to use larger files it is recommended to use a 3rd party host like youtube or vimeo and use link or a widgets to present the files to the user.
To add a file you right click select the
Files folder or use the
[...]three-dot button. This will open the context menu for files with the supported actions. Here you can:
- Add a new file
- Add a sub-folder
- Rename a file
- Find Usages
When you add a new file a window will appear, where you can add the file and choose a location to store it. A storage location can be selected through selecting the folder icon in the files field. This will open another window to select the preferred folder. The image on the right is what it looks like when you have created a few folders. By default a file is stored in the Files folder on the same level as the created folders.
The next step would be to add the file, you can do this by dragging a file to the box with "click or drop file here" or you can click in the box to select a file from your system.
For most file-types the main use-case would be to give an option for users to download these files. This can be done through dragging your file to an interaction screen. This will create a button with a download that redirects to a download link. You can also use a file as a concept property, these files are saved inside the project and are first added to the files folder before you can add it as properties. For more information about concept properties, go to the documentation about this topicProperties.
When you drag a picture file to the template editor you get an choice:
When you create a button it behaves like other files and is a link to download the file. Creating an image will show the image in its original size on the interaction canvas. The properties of the image can be altered in the properties pane on the right.
Image files can also be used to make custom buttons. The button properties gives you the option to change how the button is displayed.
Selecting the image option will open a window with the files in your project. Here you can choose the image you want to display the button as.