I get an PermissionError when using the Storage.set() function in my ‘editor’ type app.
File "viktor\core.pyx", line 1264, in viktor.core._validate_storage_scope.wrapper
File "viktor\core.pyx", line 1338, in viktor.core.Storage.set
PermissionError: Storage.set() is not available for 'editor' type apps.
Which types do support Storate.set()? I need to save a file (.ifc) after a long calculation. The file must be retrievable for download and result views. Thank you!
Storage is not supported on
editor type apps because it is not possible to create revisions for this app type. If you want to have similar functionality as the
editor app type, but with the possibility to store revisions please use the
simple app type. Implementation-wise it is similar to
editor types, you only need to adjust the app type in
viktor.config.toml. For more information please have a look at our documentation.
Alternatively, as IFC is in essence a plain text document you could also use the
@memoize decorator to store the file in the cache of the app. See the documentation for more information.