Global context.BeginPutFilesToServer
BeginPutFilesToServer
Syntax variant: By descriptions of files put
Syntax
BeginPutFilesToServer(<CallbackDescriptionOnFinish>, <CallbackDescriptionOnProgress>, <CallbackDescriptionBeforeStart>, <TransferredFileDescriptions>, <FormUniqueID>)
Parameters
<CallbackDescriptionOnFinish> (optional)
Type: CallbackDescription. Contains description of a procedure that will be called if files are placed successfully, and a procedure that will be called if an error occurs.
If at least one of passed files is not found on the hard drive, an exception is thrown. After the file is successfully placed into storage, the procedure specified in the <CallbackDescriptionOnFinish> parameter will be called with the following parameters:
- <PlacedFiles> - type: Array,Undefined. Object array of the StoredFileDescription type, or Undefined if file placing was canceled.
- <AdditionalParameters> – the value specified when creating the CallbackDescription object.
<CallbackDescriptionOnProgress> (optional)
Type: CallbackDescription. Contains description of a procedure that will be called several times as files are placed. Number of calls and call time are not strictly defined. with the following parameters:
- <FileToBePlaced> - type: FileRef Reference to the file placed to temporary storage.
- <Placed> - type: Number. Percentage of placed part of the current file.
- <CancelPuttingFiles> - type: Boolean. Indicates that further placement of file to the storage is canceled. If you set the parameter value to True in the handler procedure module, placing file to the storage will be canceled. Default value: False. The returned parameter.
- <TotalPlaced> - type: Number. Percentage of placed part of all files.
- <CancelPuttingAllFiles> - type: Boolean. Indicates that placement of all files is canceled. If you set the parameter value to True in the handler procedure module, placement of all files to the storage will be canceled. Default value: False. The returned parameter.
- <AdditionalParameters> – the value specified when creating the CallbackDescription object.
<CallbackDescriptionBeforeStart> (optional)
Type: CallbackDescription. Contains the description of the procedure to be called before files are stored. The notification is called with the following parameters:
- <FilesToStore> - type: Array Item array of the FileRef type that are ready to be placed to a temporary storage.
- <CancelPuttingAllFiles> - type: Boolean. Indicates that placement of all files is canceled. If you set this parameter to True in the handler procedure mode, placement of all files will be canceled (in this case, no other notifications will be called). Default value: False. The returned parameter.
- <AdditionalParameters> – the value specified when creating the CallbackDescription object.
<TransferredFileDescriptions> (required)
Type: Array. An array of TransferableFileDescription objects. Each array element must contain a non-empty path to the file on the hard drive. Address of the temporary storage to place a file in can be left blank. In this case, a new file is created.
<FormUniqueID> (optional)
Type: UUID. The form UUID that you can get with the UUID property of a client application form. The file is saved to a temporary storage and deleted after the form object is deleted. If you omit this parameter, the stored value is cleared after the next server call from a common module, or in a context or noncontext server call from a form, or in a server call from a command module, or when getting a form.
Description of method variant
Starts placement of files set by paths on the hard drive from local file system to temporary storage. File operation extension is required in web client. The <NotificationOfExecutionProgressDescription> handler will be called in web client only twice: when the overall quantity of bytes placed into temporary storage equals to 0 or the full size of placed files.
Syntax variant: By a search string
Syntax
BeginPutFilesToServer(<CallbackDescriptionOnFinish>, <CallbackDescriptionOnProgress>, <CallbackDescriptionBeforeStart>, <SearchString>, <FormUniqueID>)
Parameters
<CallbackDescriptionOnFinish> (optional)
Type: CallbackDescription. Contains description of a procedure that will be called if files are placed successfully, and a procedure that will be called if an error occurs.
If at least one of passed files is not found on the hard drive, an exception is thrown. After the file is successfully placed into storage, the procedure specified in the <CallbackDescriptionOnFinish> parameter will be called with the following parameters:
- <PlacedFiles> - type: Array,Undefined. Object array of the StoredFileDescription type, or Undefined if file placing was canceled.
- <AdditionalParameters> – the value specified when creating the CallbackDescription object.
<CallbackDescriptionOnProgress> (optional)
Type: CallbackDescription. Contains description of a procedure that will be called several times as files are placed. Number of calls and call time are not strictly defined. with the following parameters:
- <FileToBePlaced> - type: FileRef Reference to the file placed to temporary storage.
- <Placed> - type: Number. Percentage of placed part of the current file.
- <CancelPuttingFiles> - type: Boolean. Indicates that further placement of file to the storage is canceled. If you set the parameter value to True in the handler procedure module, placing file to the storage will be canceled. Default value: False. The returned parameter.
- <TotalPlaced> - type: Number. Percentage of placed part of all files.
- <CancelPuttingAllFiles> - type: Boolean. Indicates that placement of all files is canceled. If you set the parameter value to True in the handler procedure module, placement of all files to the storage will be canceled. Default value: False. The returned parameter.
- <AdditionalParameters> – the value specified when creating the CallbackDescription object.
<CallbackDescriptionBeforeStart> (optional)
Type: CallbackDescription. Contains the description of the procedure to be called before files are stored. The notification is called with the following parameters:
- <FilesToStore> - type: Array Item array of the FileRef type that are ready to be placed to a temporary storage.
- <CancelPuttingAllFiles> - type: Boolean. Indicates that placement of all files is canceled. If you set this parameter to True in the handler procedure mode, placement of all files will be canceled (in this case, no other notifications will be called). Default value: False. The returned parameter.
- <AdditionalParameters> – the value specified when creating the CallbackDescription object.
<SearchString> (required)
Type: String. The string must be a path to the directory where search is performed. The directory can be located both in LAN, and on FTP server. Upon using this scheme, slashes '/' and not backslashes '' are to be specified. It is allowed to specify full name of the file (path + name).
<FormUniqueID> (optional)
Type: UUID. The form UUID that you can get with the UUID property of a client application form. The file is placed to a temporary storage and automatically deleted after the form object of the client application is deleted. If you omit this parameter, the stored value is cleared after the next server call from a common module, or in a context or noncontext server call from a form, or in a server call from a command module, or when getting a form.
Description of method variant
Starts placement of files found by search string from local file system to temporary storage. File operation extension is required in web client. The <NotificationOfExecutionProgressDescription> handler is called in web client only twice: when the overall quantity of bytes placed into temporary storage equals to 0 or the full size of placed files.
Syntax variant: By links to files
Syntax
BeginPutFilesToServer(<CallbackDescriptionOnFinish>, <CallbackDescriptionOnProgress>, <CallbackDescriptionBeforeStart>, <FileRefs>, <FormUniqueID>)
Parameters
<CallbackDescriptionOnFinish> (optional)
Type: CallbackDescription. Contains description of a procedure that will be called if files are placed successfully, and a procedure that will be called if an error occurs.
If at least one of passed files is not found on the hard drive, an exception is thrown. After the file is successfully placed into storage, the procedure specified in the <CallbackDescriptionOnFinish> parameter will be called with the following parameters:
- <PlacedFiles> - type: Array,Undefined. Object array of the StoredFileDescription type, or Undefined if file placing was canceled.
- <AdditionalParameters> – the value specified when creating the CallbackDescription object.
<CallbackDescriptionOnProgress> (optional)
Type: CallbackDescription. Contains description of a procedure that will be called several times as files are placed. Number of calls and call time are not strictly defined. with the following parameters:
- <FileToBePlaced> - type: FileRef Reference to the file placed to temporary storage.
- <Placed> - type: Number. Percentage of placed part of the current file.
- <CancelPuttingFiles> - type: Boolean. Indicates that further placement of file to the storage is canceled. If you set the parameter value to True in the handler procedure module, placing file to the storage will be canceled. Default value: False. The returned parameter.
- <TotalPlaced> - type: Number. Percentage of placed part of all files.
- <CancelPuttingAllFiles> - type: Boolean. Indicates that placement of all files is canceled. If you set the parameter value to True in the handler procedure module, placement of all files to the storage will be canceled. Default value: False. The returned parameter.
- <AdditionalParameters> – the value specified when creating the CallbackDescription object.
<CallbackDescriptionBeforeStart> (optional)
Type: CallbackDescription. Contains the description of the procedure to be called before files are stored. The notification is called with the following parameters:
- <FilesToStore> - type: Array Item array of the FileRef type that are ready to be placed to a temporary storage.
- <CancelPuttingAllFiles> - type: Boolean. Indicates that placement of all files is canceled. If you set this parameter to True in the handler procedure mode, placement of all files will be canceled (in this case, no other notifications will be called). Default value: False. The returned parameter.
- <AdditionalParameters> – the value specified when creating the CallbackDescription object.
<FileRefs> (required)
Type: Array. Contains an object array of the FileRef type.
<FormUniqueID> (optional)
Type: UUID. The form UUID that you can get with the UUID property of a client application form. The file is saved to a temporary storage and deleted after the form object is deleted. If you omit this parameter, the stored value is cleared after the next server call from a common module, or in a context or noncontext server call from a form, or in a server call from a command module, or when getting a form.
Description of method variant
Starts placement of files set by references to files from local file system to temporary storage. File operation extension is not required in web client.
Syntax variant: Using file selection dialog
Syntax
BeginPutFilesToServer(<CallbackDescriptionOnFinish>, <CallbackDescriptionOnProgress>, <CallbackDescriptionBeforeStart>, <DialogParameters>, <FormUniqueID>)
Parameters
<CallbackDescriptionOnFinish> (optional)
Type: CallbackDescription. Sets a procedure to call if files are placed successfully, and a procedure that will be called if an error occurs.
After the file is successfully placed into storage, the procedure specified in the <CallbackDescriptionOnFinish> parameter will be called with the following parameters:
- <PlacedFiles> - type: Array,Undefined. Object array of the StoredFileDescription type, or Undefined if file placing was canceled.
- <AdditionalParameters> – the value specified when creating the CallbackDescription object.
<CallbackDescriptionOnProgress> (optional)
Type: CallbackDescription. Contains description of a procedure that will be called several times as files are placed. Number of calls and call time are not strictly defined. with the following parameters:
- <FileToBePlaced> - type: FileRef Reference to the file placed to temporary storage.
- <Placed> - type: Number. Percentage of placed part of the current file.
- <CancelPuttingFiles> - type: Boolean. Indicates that further placement of file to the storage is canceled. If you set the parameter value to True in the handler procedure module, placing file to the storage will be canceled. Default value: False. The returned parameter.
- <TotalPlaced> - type: Number. Percentage of placed part of all files.
- <CancelPuttingAllFiles> - type: Boolean. Indicates that placement of all files is canceled. If you set the parameter value to True in the handler procedure module, placement of all files to the storage will be canceled. Default value: False. The returned parameter.
- <AdditionalParameters> – the value specified when creating the CallbackDescription object.
<CallbackDescriptionBeforeStart> (optional)
Type: CallbackDescription. Contains the description of the procedure to be called before files are stored. The notification is called with the following parameters:
- <FilesToStore> - type: Array Item array of the FileRef type that are ready to be placed to a temporary storage.
- <CancelPuttingAllFiles> - type: Boolean. Indicates that placement of all files is canceled. If you set this parameter to True in the handler procedure mode, placement of all files will be canceled (in this case, no other notifications will be called). Default value: False. The returned parameter.
- <AdditionalParameters> – the value specified when creating the CallbackDescription object.
<DialogParameters> (optional)
Type: PutFilesDialogParameters. The structure containing dialog box parameters that will be shown to the user.
<FormUniqueID> (optional)
Type: UUID. The form UUID that you can get with the UUID property of a client application form. The file is saved to a temporary storage and deleted after the form object is deleted. If you omit this parameter, the stored value is cleared after the next server call from a common module, or in a context or noncontext server call from a form, or in a server call from a command module, or when getting a form.
Description of method variant
Starts file placement and shows the dialog box for selecting files to be placed from local file system to temporary storage. File operation extension is not required in web client.
Description
Begins putting files to temporary storage.
Availability
Thin client, web-client, mobile client, thick client, mobile application (client), mobile application (server), mobile standalone server.
Note
In web client, if calling the method via file system extension, the <NotificationOfProgressDescription> handler is called only twice: when the overall quantity of bytes placed into temporary storage is 0, or when it is equal to the full size of placed files. After you call this method, you can call a similar method without waiting for the previous one to complete.
No comments to display
No comments to display