diff --git a/configurations/default/server.yml.tmp b/configurations/default/server.yml.tmp index 2a94ab43f..74b0b2338 100644 --- a/configurations/default/server.yml.tmp +++ b/configurations/default/server.yml.tmp @@ -18,6 +18,8 @@ application: modules: enterprise: enabled: false + # Setting this to true will upload all feeds to S3 instead of linking to their URL + prefer_s3_links: false editor: enabled: true deployment: diff --git a/src/main/java/com/conveyal/datatools/manager/jobs/PublishProjectFeedsJob.java b/src/main/java/com/conveyal/datatools/manager/jobs/PublishProjectFeedsJob.java index fc881e014..214790baa 100644 --- a/src/main/java/com/conveyal/datatools/manager/jobs/PublishProjectFeedsJob.java +++ b/src/main/java/com/conveyal/datatools/manager/jobs/PublishProjectFeedsJob.java @@ -17,6 +17,7 @@ import java.text.SimpleDateFormat; import static com.conveyal.datatools.manager.DataManager.getConfigPropertyAsText; +import static com.conveyal.datatools.manager.DataManager.hasConfigProperty; /** * Publish the latest GTFS files for all public feeds in a project. @@ -67,7 +68,7 @@ public void jobLogic () { .forEach(fs -> { // generate list item for feed source String url; - if (fs.url != null) { + if (fs.url != null && !hasConfigProperty("modules.enterprise.prefer_s3_links")) { url = fs.url.toString(); } else {