DropboxConnector
Accesses the Dropbox file storage service to upload, download, or delete files and folders or list the contents of a folder from a Dropbox account.
典型的用途
- Manage datasets on Dropbox by uploading, downloading, and deleting files and folders
- 将文件的内容(例如XML或栅格)传输到FME中的属性中
- Read downloaded Dropbox data using theFeatureReader或上传由featurewriter.放弃
- Retrieve file and folder names, paths, links and other information from Dropbox to use elsewhere in a workspace.
How does it work?
Depending on your choice of actions, it will upload or download files, folders, and attributes; list information from the service; or delete items from the service. On uploads, link attributes are added to the output features. On List actions, file/folder information is added as attributes.
In this example, the DropboxConnector is used to download an Autodesk AutoCAD DWG file from Dropbox. After creating a valid web connection to a Dropbox account (which can be done right in the Dropbox Account parameter), the path and filename to download both from and to are entered.
s
AFeatureReader添加以阅读新下载的数据集。这里,Parcellines功能类型将在工作区的其他位置进一步处理。
通过在工作区中执行下载,每次运行工作空间时都会刷新源数据集。
在工作空间的此示例部分中,DropboxConnector用于将Rast OrthoImage从Dropbox下载到属性中。
该文件从Dropbox读取,并将内容存储为Blob属性。然后一个RasterReplacer.用于将BLOB解释为可用的栅格格式。
这两个变换器的组合避免了必须将图像下载到本地存储并重新读取它。一种类似的技术可以用于点云文件,使用pointcloudreplacer.变压器。
使用说明
This transformer cannot be used to directly move or copy files between different Dropbox locations. However, multiple DropboxConnectors can be used to accomplish these tasks.
该变形器的性能取决于分配给Java虚拟机(JVM)的内存量。以下环境变量允许您为Java插件指定可用的内存:
- FME_JVM_MIN_HEAP_SIZE: Initial heap size for initializing the JVM. Default value is 1024K.
- FME_JVM_MAX_HEAP_SIZE: Maximum heap size for initializing JVM. Default value is 16384K.
If unset, the JVM applies the default values. If set, the values must be multiples of 1024K (for example, 4M and 64M, or 4096K and 32768K).
笔记:要传递FME使用的其他参数到Java虚拟机,请使用java_tool_options环境变量。
配置
输入端口
此变形器接受任何功能。
Output Ports
此变压器的输出将根据执行的Dropbox操作而变化。
- 答:Upload操作,文件的URL可以保存到可共享链接和直接下载链接属性。
- ADownloadaction can save to either a file or attribute.
- A删除操作将保存到已删除的文件count属性的文件/文件夹的数量。
- Finally, aListaction will output a new feature for each file/folder found in the path specified. Each of these new features will have attributes listing various pieces of information about the object.
导致操作失败操作的功能将通过此端口输出。一个fme_reimpe_code.属性,具有值ERROR_DURING_PROCESSING, will be added, along with a more descriptivefme_rejection_messageattribute which contains more specific details as to the reason for the failure.
拒绝功能处理:可以设置为终止翻译或在遇到被拒绝的功能时继续运行。此设置可用作默认设置FME选项和A.workspace parameter.
Parameters
Dropbox Action. | 执行的操作类型。选择包括:
|
Dropbox帐户 | Performing operations against a Dropbox account requires the use of OAuth2 authentication using a Web Connection. To create a Dropbox connection, click the 'Dropbox Account' drop-down box and select 'Add Web Connection...'. The connection can then be managed via Tools -> FME Options... -> Web Connections. |
可用的剩余参数取决于请求> Dropbox操作参数的值。每个Dropbox操作的参数如下所述。
Dropbox Path
在路径中删除文件 |
dropbox上的文件/文件夹的路径要删除。 |
输出属性
删除d File Count |
Specify the attribute that will store a count of the number of files/folders that were deleted. |
Dropbox源
Download File at Path |
下载文件的Dropbox路径。 |
Destination
Download as | Select whether to store the downloaded data in a File or Attribute.
|
下载到文件 | Specify the path to the file that will store the downloaded file. |
Download to Attribute | Specify the attribute that will store the contents of the downloaded file. Valid for Download as Attribute only. |
Dropbox Path
List Contents at Path |
The path on Dropbox to list the contents of. |
输出属性
提供默认属性名称,可能会被覆盖。
文件或文件夹名称 |
Specify the attribute to hold the name of an object on Dropbox. |
Full Path |
Specify the attribute to hold the full path of an object on Dropbox. |
File Size |
指定属性以保存Dropbox上的文件对象大小。 |
修订 | 指定要在Dropbox上保存对象的修订字符串的属性。 |
Last Modified |
Specify the attribute to hold the last modified date of an object on Dropbox. |
File or Folder Flag |
指定属性以保存Dropbox上对象的类型(文件或文件夹)。 |
来源
Upload from |
The type of data to be uploaded.
When working with large objects, File is a better choice than Attribute Content as the data will be streamed directly from disk and not require that the object be stored entirely in memory on a feature. |
文件上传 |
The file to be uploaded to Dropbox if Upload from is set to File. |
来源Folder |
The folder to be uploaded to Dropbox if Upload from is set to Folder. |
包括子文件夹 |
Choose whether to upload subfolders of the Source Folder or not. |
属性以载为文件 |
The data to be uploaded, supplied from an attribute if Upload from is set to Attribute Content. |
数据编码 | The encoding type of Attribute to Upload as File. |
Dropbox Destination
上传到路径 | Dropbox上的路径将源文件上传到。要上传到根目录,请输入“/”。 |
Upload with File Name | 从属性中提供的数据创建的文件的名称以将其作为文件上传。名称必须包含文件名扩展名(例如,.txt,.jpg,.doc)。 |
输出属性
Shared Link | 指定输出属性,该属性将存储链接到Dropbox上的文件的临时可访问的URL。 |
直接下载链接 | 指定将存储链接到Dropbox上的文件的URL的输出属性。URL只能由经过身份验证的用户使用。 |
编辑变换器参数
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, clickbeside the applicable parameter. For more information, see变压器参数菜单选项.
定义值
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.
使用文本编辑器
文本编辑器提供了一种方便的方法来构建来自各种数据源的文本字符串(包括正则表达式),例如属性,参数和常量,其中结果直接在参数内使用。
使用算术编辑器
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
条件值
根据通过或失败的一个或多个测试条件设置值。
内容
Expressions and strings can include a number of functions, characters, parameters, and more - whether entered directly in a parameter or constructed using one of the editors.
These functions manipulate and format strings. | |
文本编辑器中提供了一组控制字符。 | |
两个编辑器都有数学函数。 | |
These operators are available in the Arithmetic Editor. | |
这些主要是特定于特征的值。 | |
FME and workspace-specific parameters may be used. | |
Working with User Parameters | 创建自己的可编辑参数。 |
参考
Processing Behavior |
|
Feature Holding |
No |
依赖性 | Dropbox帐户 |
FME Licensing Level | FME专业版及以上 |
别名 | DropboxCaller |
历史 | |
类别 |
FME Knowledge Center
FME知识中心是演示,How-TOS,文章,常见问题和更多的地方。获取您的问题的答案,从其他用户学习,并建议,投票和评论新功能。
搜索all results about the DropboxConnectoron the FME Knowledge Center.