Creating StorageItemsΒΆ

You create a storage item in the default storage location using StorageItem.Static.create(). (For details about declaring the default configuration, see Setting the Default Storage Item Configuration.)

StorageItem newStorageItem = StorageItem.Static.create();

In addition, you can specify a different storage location using StorageItem.Static.createIn("configurationKey").

StorageItem newStorageItem = StorageItem.Static.createIn("myStorageName");

In the previous snippet, Dari instantiates the storage item newStorageItem using the storage item Configuration Key myStorageName defined in the Tomcat context.xml.

See also:

Upload Handling

Configuring StorageItem