diff --git a/config/config.sample.php b/config/config.sample.php
index 2a368965fbab422795a18baff9e616720f9c09bf..6ea7ea6fc1a127970be6e85de24d3bac5ba4a137 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -969,6 +969,14 @@ $CONFIG = array(
  */
 'cache_path' => '',
 
+/**
+ * TTL of files located in the cache folder before they're removed by
+ * garbage collection (in seconds). Increase this value if users have
+ * issues uploading very large files via the ownCloud Client as upload isn't
+ * completed within one day.
+ */
+'cache_folder_gc_ttl' => 86400, // 60*60*24 = 1 day
+
 /**
  * Using Object Store with ownCloud
  */
diff --git a/lib/private/Cache/File.php b/lib/private/Cache/File.php
index 38f88959bd75fe0cbe5391a3706e3ce6c5ecb489..f2992a614e43a152ec2f8e72432b72751aa4a851 100644
--- a/lib/private/Cache/File.php
+++ b/lib/private/Cache/File.php
@@ -111,7 +111,7 @@ class File implements ICache {
 		$keyPart = $key . '.' . $uniqueId . '.part';
 		if ($storage and $storage->file_put_contents($keyPart, $value)) {
 			if ($ttl === 0) {
-				$ttl = 86400; // 60*60*24
+				$ttl = \OC::$server->getConfig()->getSystemValue('cache_folder_gc_ttl', 86400);
 			}
 			$result = $storage->touch($keyPart, time() + $ttl);
 			$result &= $storage->rename($keyPart, $key);