Questions in topic: "custom link" https://knowledge.亚搏在线safe.com/questions/topics/single/68135.html The latest questions for the topic "custom link" Create a Custom Download Link for Results from Data Download Service https://knowledge.亚搏在线safe.com/articles/678/create-a-custom-download-link-for-results-from-dat.html
This article is works for FME Server 2014 SP2 and newer

Introduction

FME Server uses the Data Download Service web app to deliver data results through the Web Application Service.There is a default URL for results,which is provided in emails and the web interface,but you may wish to modify this when using a different web or FTP server for delivering the data.

Setting a Custom URL (and/or Port) for the Data Download Link

In order to set up a custom URL and/or a port,you must be the administrator your FME Server as well as the administrator for the computer where FME Server is installed.

Note: Anywhere that is listed as a file path,this is where your FME Server is installed.This can usually be found in C:\ProgramFiles\FME Server

1) Create output folder

First,you will need to create your desired output folder.In windows explorer go to \Utilities\tomcat\webapps\ROOT then in the ROOT folder create a new folder.For this example,our folder will be called outputfolder

2) Update FME Engine configuration file

Now that we have a new folder we will need to edit the FME Engine configuration file to point to it.As an administrator openfmeEngineConfig.txtin a text editor.This file can be found at \Server

Locate the ‘SUB_SECTION FILE_DOWNLOAD_SERVICE' line then beneath it there is a line called SUCCESS_RESPONSE 0: Replace the entire SUCCESS_RESPONSE 0 line with following:

SUCCESS_RESPONSE 0:Translation Successful|NotificationLocation=!FME_AUTO_DIR_NAME!_nw|OutputLocation=!FME_AUTO_DIR_NAME!|ResultPrefix=https://mywebserver:443|ResultRootDir=/outputfolder|NumFeaturesOutput=!FME_NUM_FEATURES_OUTPUT!|LogFileName=!FME_TRANSFORMATION_LOG_NAME!\

We are adding in the ResultPrefix and changing the ResultRootDir.This is in the format of $ResultPrefix/$ResultRootDir/ .zip,you can also change ‘ :// : ' as well.

The download URL for this configuration will look like:https://mywebserver:443/outputfolder/FME_1a2b3ct.zip

While we are still in thefmeEngineConfig.txt filewe will need to set the FME_WORKING_DIR,to do this we will create a new line below ‘SUB_SECTION FILE_DOWNLOAD_SERVICE' and add the following:

FME_WORKING_DIR "C:/Program Files/FMEServer/Utilities/tomcat/webapps/ROOT/outputfolder"  \

This will override the FME_WORKING_DIR in the GLOBAL_SECTION.Do not edit the GLOBAL_SECTION.

Save the file.If you are receiving an error about permissions,close the text editor and re-open it as an administrator.

3) Change location of output folder in the properties file

Next,we will need to change the location of our output folder in the Data Download service's properties file.Open a text editor in Administrator mode and browse to and open thepropertiesFile.propertiesfile which can be found in \Utilities\tomcat\webapps\fmedatadownload\WEB-INF\conf\

Change the following line to:

# RESULT_DIR - This is the directory where transformation results are stored.RESULT_DIR=C:/Program Files/FMEServer/Utilities/tomcat/webapps/ROOT/outputfolder  \

Save the file.

4) Run a workspace on FME Server

Open FME Server and run a workspace that has the Data Download Service.For this example,we will use the austinDownload.fme workspace in the Samples Repository.

Run the workspace and you should see your customized data download URL link:

The custom URL link will also be in the email response users receive when a job completes.

If your link hasn't changed,go back and double check that your slashes are the correct way.If you copied and pasted your path from Windows Explorer,you will need to change the slash from a backslash ( \ ) to a forward slash ( / ).Also,ensure that each of your lines ends with a backslash.

data download custom link Thu,08 Oct 2015 19:14:11 GMT steveat亚搏在线safe