Data Upload Service
You can upload source data or other file-based resources for FME Server workspaces.
In the FME Server Web User Interface, file upload is available for any workspace with a published parameter that represents a file used by the workspace. For more information, see Uploading Data Files.
Note: When working with .zip files, we recommend using modern zip utilities that support Unicode file names. If file names are not in Unicode, you can specify the DEFAULT_ZIP_CODEPAGE web application property.
Once data is uploaded, users can select the uploaded data for the workspace to use.
Shelf Life of Uploaded Files
By default, files are deleted one day after they are uploaded. To change, update task Delete_DataUpload_Files on the System Cleanup page of the Web User Interface. For more information, see Cleaning Up FME Server Logs and Other Files.
Request Elements
Supported Request Methods
The following methods are available for interacting with the Data Upload service. The methods supported for sending files are PUT and POST. The HTTP GET method is supported for browsing files that are already uploaded.
Only volatile storage is supported, and all requests must be associated with an FME Server workspace.
Request |
Request Description |
HTTP Method |
Target URI |
---|---|---|---|
Upload a single file |
Upload a file using the HTTP PUT method. |
PUT |
http://host[:port]/fmedataupload/<repository>/<workspace>/<filename> |
Upload a single file or multiple files |
Upload a single file or multiple files using a simple form submission that uses HTTP POST. |
POST |
http://host[:port]/fmedataupload/<repository>/<workspace> |
Browse Uploaded Files |
Get a list of all uploaded files for a session by making a GET request, either to the same URI used to upload files originally, or, in the case of archives, append to this an archive file and/or a file path within the archive for a listing of files there. Use the optional path component at the end to show the contents of a sub-folder within an archive file. To report just the root contents of the archive file, omit the optional path. |
GET |
http://host[:port]/fmedataupload/<repository>/<workspace>/<archive file name>/[<filename or path within archive>] |
Request Parameters
Name |
Value |
Description |
---|---|---|
opt_fullpath |
true | false |
When enabled, the service response includes the physical or absolute path for each file that the FME Engine can use. |
opt_namespace | <value> |
If specified, uploads are placed in a folder named <value>. If not specified, uploads are placed in a folder named after the name of the uploading user. Note: If an application uses a single token to connect to FME Server, we recommend specifying a session identifier, random number, or GUID to distinguish individual uploads and prevent multiple users from uploading files with conflicting filenames to the same repository/workspace location. |
opt_extractarchive This parameter is not available in HTTP GET because extracting archives is an operation and not a state flag. |
true | false |
When enabled, the service extracts uploaded zip files and returns the file contents inside of zip files. If false, and the requested path inspects the contents of a zip or archive file, an error response results. If false, and the requested path is valid, but opt_pathlevel is 2 or higher, a path level of 1 is implied. |
opt_responseformat |
xml | json |
Defines the language of the response. The text must be all lowercase. |
opt_pathlevel |
-1 | 0 | n |
Specifies how many levels of recursion deep to show file and folder information. |
Response Elements
Element |
Child Elements |
Value |
Description |
---|---|---|---|
statusInfo |
status |
success | failure |
The service status. |
file, folder, archive |
name |
string |
The name of the file that was uploaded. |
size |
long integer |
The size in bytes of the file uploaded. The size element does not apply to folders and is absent beneath folder elements. |
|
path |
string |
The absolute or physical path of the file (which is used by an FME Engine). |
|
session |
none |
string |
A session identifier that is always included in each data upload response as an HTTP cookie as well as in the body of the response. The value is the value of the opt_namespace request parameter, if specified, or the name of the uploading user. |