| Package | com.adobe.rtc.collaboration |
| Class | public class BinaryPublisher |
| Inheritance | BinaryPublisher FilePublisher mx.core.UIComponent |
publish()
to submit a ByteArray of file data, and notify other users of the presence of the new file. Users on the receiving
end can use the FileManager APIs to detect the presence of new files on the service, and use either the FileSubscriber
or BinarySubscriber to download its contents either as a complete file or as file data.
See also
| Method | Defined by | ||
|---|---|---|---|
![]() |
amIUploadingFile():Boolean
Specifies whether or not the current user is uploading a file.
| FilePublisher | |
![]() |
browse(p_itemID:String, p_typeFilter:Array = null):void
browse() begins the process of preparing for upload by prompting the user to
select a file. | FilePublisher | |
|
cancelFileUpload():void
Cancels any current file upload if one is in progress.
| BinaryPublisher | ||
![]() |
close():void
Disposes all listeners to the network and framework classes.
| FilePublisher | |
![]() |
createAndUseGroup(p_groupName:String, p_nodeConfiguration:NodeConfiguration = null):void
Creates a new group of files within the FileManager with the specified name and optionally configures
its permissions.
| FilePublisher | |
![]() |
Gets the NodeConfiguration on the file group.
| FilePublisher | |
![]() |
getUserRole(p_userID:String):int
Returns the role of a given user for files, within the group this component is assigned to.
| FilePublisher | |
|
publish(p_fileName:String, p_fileData:ByteArray, p_itemID:String = null, p_contentType:String = "application/octet-stream"):void
publish() takes a file name, ByteArray-formatted file data, a uniqueID,
and an optional content-type parameter, and publishes the given data via HTTP to the service. | BinaryPublisher | ||
![]() |
remove(p_fileDesc:FileDescriptor):void
Removes the file specified by the
fileDescriptor. | FilePublisher | |
![]() |
setNodeConfiguration(p_nodeConfiguration:NodeConfiguration):void
Sets the NodeConfiguration.
| FilePublisher | |
![]() |
setUserRole(p_userID:String, p_userRole:int):void
Sets the role of a given user for publishing and subscribing to this component's group
specified by
groupName. | FilePublisher | |
![]() |
subscribe():void
Tells the component to begin synchronizing with the service.
| FilePublisher | |
![]() |
updateFilename(p_fileDesc:FileDescriptor, p_newName:String):void
Updates the file name of the file specified by the
fileDescriptor with a new name. | FilePublisher | |
![]() |
uploadFileReference(p_fileReference:FileReference, p_uid:String):void
Uploads the FileReference passed in.
| FilePublisher | |
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched on an upload completion. | BinaryPublisher | |||
![]() | Dispatched on upload completion. | FilePublisher | ||
| Dispatched on an HTTP status change. | BinaryPublisher | |||
![]() | Dispatched on upload progress. | FilePublisher | ||
![]() | Dispatched on file select for upload. | FilePublisher | ||
![]() | Dispatched when the component either loses its connection to the session or regains it and has finished re-synchronizing itself to the rest of the room. | FilePublisher | ||
| cancelFileUpload | () | method |
public override function cancelFileUpload():voidCancels any current file upload if one is in progress.
| publish | () | method |
public function publish(p_fileName:String, p_fileData:ByteArray, p_itemID:String = null, p_contentType:String = "application/octet-stream"):void
publish() takes a file name, ByteArray-formatted file data, a uniqueID,
and an optional content-type parameter, and publishes the given data via HTTP to the service.
Subscribed clients will receive a updatedFileDescriptor
event from the FileManager to indicate progress of the upload.
p_fileName:String — The name for the new file, including the extension.
|
|
p_fileData:ByteArray — A ByteArray of data to publish as a file to the service.
|
|
p_itemID:String (default = null) — A uniqueID to give the file.
|
|
p_contentType:String (default = "application/octet-stream") — Optionally, the MIME content-type of the data; it defaults to "application/octet-stream".
|
| complete | event |
| httpStatus | event |
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/labs/acrobatcom/com/adobe/rtc/collaboration/BinaryPublisher.html