DropboxConnector
一种ccesses 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
- Transfer a file's contents (such as XML or raster) into or out of an attribute in FME
- Read downloaded Dropbox data using theFeatureReader, or upload data written by theFeatureWriterto Dropbox
- Retrieve file and folder names, paths, links and other information from Dropbox to use elsewhere in a workspace.
How does it work?
The DropboxConnector uses your Dropbox account credentials (either via a previously defined FME web connection, or by setting up a new FME web connection right from the transformer) to access the file storage service.
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.一种fter 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
一种FeatureReaderis added to read the newly downloaded dataset.Here, the ParcelLines feature type will be further processed elsewhere in the workspace.
By executing the download here in the workspace, the source dataset will be refreshed every time the workspace is run.
In this example portion of a workspace, the DropboxConnector is used to download a raster orthoimage from Dropbox into an attribute.
该文件是从Dropbox的阅读,其内容作为Blob存储的属性。然后,RasterReplacer用于团块解释成可用光栅格式。
这两个变压器的组合,避免了下载图片到本地存储和重新阅读。类似的技术可用于点云的文件,使用PointCloudReplacer变压器。
Usage Notes
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.
The performance of this transformer is dependent on the amount of memory allocated to the Java Virtual Machine (JVM).The following environment variables allow you to specify memory available to Java Plugins:
- FME_JVM_MIN_HEAP_SIZE: Initial heap size for initializing the JVM.If unset, the default value is 1024K.
- FME32_JVM_MIN_HEAP_SIZE: Same as FME_JVM_MIN_HEAP_SIZE, but applies to 32-bit FME Desktop on Windows, and if set, takes precedence over FME_JVM_MIN_HEAP_SIZE.
These variables must be set in multiples of 1024 and greater than 1 MB.To indicate kilobytes, megabytes, or gigabytes, appendkorK,morM, orgorGrespectively.For example, any of these values is acceptable:
6291456
6144k
6m
- FME_JVM_MAX_HEAP_SIZE: Maximum heap size for initializing the JVM.If unset, the default value is 16384K.
- FME32_JVM_MAX_HEAP_SIZE: Same as FME_JVM_MAX_HEAP_SIZE, but applies to 32-bit FME Desktop on Windows, and if set, takes precedence over FME_JVM_MAX_HEAP_SIZE.
These variables must be set in multiples of 1024 and greater than 2 MB.To indicate kilobytes, megabytes, or gigabytes, appendkorK,morM, orgorGrespectively.For example, any of these values is acceptable:
83886080
81920k
80m
注意:To pass additional parameters used by FME to the Java Virtual Machine, use the JAVA_TOOL_OPTIONS environment variable.
Configuration
输入 Ports
该变压器接受任何功能。
产量 Ports
这台变压器的输出将取决于Dropbox的行动进行改变。
- 后上传行动网址的文件可以保存到可共享的链接并直接下载链接的属性。
- 一种下载动作可以保存到一个文件或属性。
- 一种删除行动将节省删除,被删除的文件计数属性的文件/文件夹的数量。
- 最后,名单行动将输出在指定的路径中找到的每个文件/文件夹中的新功能。每一个的这些新功能将具有属性列出各种条关于对象的信息。
Parameters
Dropbox的行动 | 的操作类型来执行。选项包括:
|
保管箱帐户 | 执行行动,打击Dropbox帐户需要使用Web连接使用的OAuth2认证。要创建一个Dropbox的连接,点击“Dropbox的帐户”下拉框,选择“添加网络连接...”。 随后,连接将可以通过管理工具 - > FME选项...- >网络连接。 |
The remaining parameters available depend on the value of the Request > Dropbox Action parameter.Parameters for each Dropbox Action are detailed below.
Dropbox的路径
删除 File at Path |
路径上的Dropbox文件/文件夹删除。 |
输出属性
删除d File Count |
指定存储已删除的文件/文件夹的数量的计数的属性。 |
Dropbox的来源
下载 File at Path |
Dropbox的文件路径下载。 |
目的地
下载为 | 选择是否下载的数据存储在一个File or Attribute.
|
下载 to File | 指定的路径将存储下载文件的文件。 |
下载 to Attribute | 指定存储下载的文件的内容的属性。适用于下载作为唯一的属性。 |
Dropbox的路径
名单 Contents at Path |
The path on Dropbox to list the contents of. |
输出属性
提供默认的属性名称,并且可能会被覆盖。
File or Folder Name |
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的文件对象的大小属性。 |
Revision | 指定要持有Dropbox的对象的修订版字符串的属性。 |
Last Modified |
Specify the attribute to hold the last modified date of an object on Dropbox. |
File or Folder Flag |
Specify the attribute to hold the type (file or folder) of an object on Dropbox. |
资源
上传 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. |
File to Upload |
The file to be uploaded to Dropbox if Upload from is set to File. |
资源 Folder |
如果上传设置为文件夹中的文件夹上传到Dropbox的。 |
Include Subfolders |
Choose whether to upload subfolders of the Source Folder or not. |
一种ttribute to Upload as File |
The data to be uploaded, supplied from an attribute if Upload from is set to Attribute Content. |
Data Encoding | 属性中的编码类型上传为文件。 |
Dropbox的目的地
上传 to Path | 在Dropbox的路径上传的源文件。要上传到根目录,输入“/”。 |
上传 with File Name | 在属性提供给上传数据创建的文件的名称为文件。名称必须包括文件扩展名(例如,txt文件,.JPG,.DOC)。 |
输出属性
Shared Link | Specify the output attribute that will store a temporary publicly accessible URL that links to the file on Dropbox. |
Direct Download Link | Specify the output attribute that will store a URL that links to the file on Dropbox.The URL can only be used by authenticated users. |
Editing Transformer Parameters
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, seeTransformer Parameter Menu Options。
Defining Values
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.
使用文本编辑器
文本编辑器提供了一个方便的方法来构造从各种数据源,如属性,参数和常量,其中该结果被直接使用的参数中的文本字符串(包括正则表达式)。
使用算术编辑器
算术编辑器提供了一个方便的方法来构造从各种数据源,如属性,参数和特征函数,其中结果被直接使用的参数内的数学表达式。
条件值
根据一个或多个测试条件,要么通过或失败的设定值。
内容
表达式和字符串可以包括多个功能,字符,参数等。
当设定值 - 无论是直接在参数输入或使用的编辑之一构造 - 字符串和表达式包含字符串,数学,日期/时间或FME特征函数将具有评价这些功能。因此,这些功能的名称(在形式@ <FUNCTION_NAME>)不应该被用作文字字符串值。
These functions manipulate and format strings. | |
Special Characters |
一种 set of control characters is available in the Text Editor. |
Math functions are available in both editors. | |
Date/Time Functions | Date and time functions are available in the Text Editor. |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Creating and Modifying User Parameters | Create your own editable parameters. |
Reference
加工行为 |
|
特点控股 |
没有 |
依赖 | Dropbox帐户 |
FME许可级别 | FME专业版及以上 |
别名 | DropboxCaller |
历史 | |
分类 |
FME Community
The FME Community is the place for demos, how-tos, articles, FAQs, and more.Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.
Search forall results about the DropboxConnectoron the FME Community.
Examples may contain information licensed under the Open Government Licence – Vancouver