-
Notifications
You must be signed in to change notification settings - Fork 24
MobileCRM.Services.DocumentService.pasteFile
rescocrm edited this page Aug 2, 2024
·
10 revisions
Takes the file from clipboard and calls the async callback with file info.
| Argument | Type | Description |
|---|---|---|
| callback | function(MobileCRM.Services.FileInfo) | The callback function which is called asynchronously with MobileCRM.Services.FileInfo object as an argument. |
| errorCallback | function(errorMsg) | The errorCallback which is called in case of error. |
| scope | Object | The scope for callbacks. |
This example demonstrates how to retrieve file from the clipboard (if platform supports this action).
var service = new MobileCRM.Services.DocumentService();
service.pasteFile(function (fileInfo) {
/// <param name='fileInfo' type='MobileCRM.Services.FileInfo '/>
MobileCRM.bridge.alert("File pasted: " + fileInfo.filePath + "\n" + fileInfo.url);
}, MobileCRM.bridge.alert);