10.0 File Exchange and DropBoxes¶
Users of web.alive can send files to each other and share files using two mechanisms – File Exchange and Dropboxes. File Exhange involves avatars sending files to each other and Dropboxes are virtual world objects where files can be uploaded and downloaded. This chapter describes what the content developer needs to do to enable these features.
10.1 File Exchange¶
The good news with file exchange is that the content developer does not have to make any content changes to enable the feature. Provided that the web.alive server has been setup correctly, users can exchange files without any support from the level. This is because the actor that handles file exchange is in fact the Player Pawn (the avatar). The file exchange mechanism can be triggered three ways:
- A file can be dropped on an avatar and the file will be sent to that user.
- The avatar menu contains the menu item “Send File To User…”. Once activated, a file chooser is presented to the sending user and then the selected file is sent to the user associated with the original menu.
- The default menu contains the menu item “Send File To Users in Proximity…”. Once activated, a file chooser is presented to the sending user and then the selected file is sent to the users in proximity to the sending user.
File Exchange is only supported in client/server configurations. This is the same restriction that exists with insertion upload. The standalone configuration launched from web.alive Editor does not support file exchange.
File Exchange does not use a peer-to-peer architecture. Instead, files are uploaded to the web server and then downloaded to the recipient user.
10.2 Dropboxes¶
Dropboxes are file folders that exist in the 3d virtual world. Users can upload files to the dropbox and users can download files from the dropbox. It is a file sharing mechanism that is not associated with avatars.
In terms of content, dropboxes are very similar to insertions (without the texture part). There is a DropboxActor and several triggers used to manipulate the dropbox. The reader should be familiar with the insertion concepts for actors and triggers as these apply to dropboxes.
10.2.1 The DropboxActor¶
Central to the dropbox feature is the DropboxActor. All the functionality of the dropbox is in the DropboxActor. One DropboxActor defines one dropbox – a level can have many dropboxes and this is controlled by the number of DropboxActors. Each DropboxActor provides services to one or more triggers using the usual unreal trigger mechanism (properties Tag and Event). Usually a DropboxActor would not be visible in the level and only be accessible via its triggers.
There are only 2 properties on the DropboxActor that the content developer needs to know about in order to setup a dropbox. The DropboxId property is automatically set when the DropboxActor is created in the web.alive editor and can be viewed only. It’s a unique id that is used to identify the dropbox in entities like URLs. The DropboxName property must be set by the content developer when the DropboxActor is created. It’s a human readable string that identifies the dropbox (e.g. “Room 1 Shared File Folder”). It’s displayed to the user when they show the dropbox contents.
10.2.2 Dropbox Triggers¶
There are a number of triggers defined for operating the dropbox. They are as follows:- ShowDropboxContentsUseTrigger
- ShowDropboxContentsLookAndUseTrigger
- UploadToDropboxLookAndUseTrigger (supports file drop)
- DeleteDropboxContentsLookAndUseTrigger
- DropboxMenuLookAndUseTrigger (supports file drop)
The last trigger in this list provides full menu support in a single trigger for the dropbox. Please see The Special Trigger – MenuLookAndUseTrigger on page 70 for full information on MenuLookAndUseTriggers.
The DropboxMenuLookAndUseTrigger is a typical MenuLookAndUseTrigger with the following characteristics:- The default action for this trigger is Show Dropbox Contents.
- As with other MenuLookAndUseTriggers, the DropboxMenuLookAndUseTrigger provides two levels of access control. The admin level actions are Upload to Dropbox (both trigger and drag’n’drop) and Delete Dropbox Contents.
How triggers are displayed for dropboxes is really up to the content developer’s imagination. Since there is no texture for dropboxes like there are for insertions, the idea of placing invisible triggers in front of the dropbox is not applicable. Most common is to have one dropbox per meeting room and then have visible dropbox triggers for that dropbox at various locations around the room (perhaps in front of each chair).
10.2.3 Additional Dropbox Information¶
Dropboxes are only supported in client/server configurations. This is the same restriction that exists with insertion upload. The standalone configuration launched from web.alive Editor does not support dropboxes. Content developers should at least test that their triggers are connected to the actor properly.
Dropboxes do not use a peer-to-peer architecture. Instead, files are uploaded to the web server and then downloaded by the recipient user.
Dropbox actors do not have any user state information currently. They do not know how many files are in the dropbox, and they do not know if the dropbox is full or empty.