A wrap instance can have file attachments. The Media Upload widget allows your users to upload documents, images or streaming media into a wrap instance.
The Media Upload widget makes it possible to use wraps in document management solutions. Users can attach scanned or digital documents, photos, videos and any other files they want to store with the wrap instance.
Example: A Wrap is used to report problems with railway carriages. The Wrap contains a Media Upload widget that allows users to attach photos to each error report.
You can retrieve a list of the uploaded file names using the MediaFileNames function.
You can access the uploaded media files also from other wrap instances using the WrapLinkMedia widget.
The Media Upload widget is a visual guide that helps you insert a wrapupload() function into the current cell.
You must always name all input fields. It adds clarity to the spreadsheet but more importantly names the database column where each input field is saved. If you share the uploaded media with other wraps, their WrapLinkMedia widgets will link to this cell name.
The list should contain patterns that match all the filenames you accept for upload. Separate the patterns with semicolons.
Files that don’t match any of the patterns will be ignored.
You can use a leading wildcard, i.e. both “*.pdf” and “*doc.pdf” are valid filename patterns.
Certain file types are forbidden to ensure that users do not upload files that could harm the ExcelWraps environment:
The height of the widget is 39 pixels by default. You may want to increase the height if many files are expected to be added, to make room for all the file icons.
An additional layer of security is wrapped around any document uploaded. To view an uploaded document, you must have the correct role permission. Even if you know the file location on the server, you cannot access a document unless you have the correct role permission for it.
To delete a field, widget, wrap function or signature that has been stored at least once in the live production database is not a trivial task. The instructions below are only applicable during the initial development of a wrap, before it has ever been used in production. Read more about making changes to your wraps.
To remove a Media Upload widget:
In the example above, the Media Upload widget lets the user upload a few common file types for images with each wrap instance.
Files can be previewed in the wrap so make sure the Media Widget’s cell has adequate height and width. The height of the Media Upload widget itself is set to 52 pixels.
The following cell formula is inserted into the cell.
=@WRAPUPLOAD("*.gif;*.jpg;*.png;*.webp", 52)
=WRAPUPLOAD("filename_patterns", scroll_height)
A list of patterns that match all the filenames you accept for upload. Enclose the list in quotes and separate the patterns with semicolons. For details, read more under Parameters above.
The height of the widget is 39 pixels by default. You may want to increase the height if many files are expected to be added, to make room for all the file icons.
The WRAPUPLOAD() function must be the only function in the Excel formula and it cannot be nested with another Excel function.