diff --git a/apps/files_sharing/api/share20ocs.php b/apps/files_sharing/api/share20ocs.php
index f5834fb2831cb8013c1b0bec9659107cf42d1bf6..4abd821f2ae5186d710300cdf583c119df89eff9 100644
--- a/apps/files_sharing/api/share20ocs.php
+++ b/apps/files_sharing/api/share20ocs.php
@@ -303,6 +303,15 @@ class Share20OCS {
 				return new \OC_OCS_Result(null, 404, 'public link sharing is disabled by the administrator');
 			}
 
+			/*
+			 * For now we only allow 1 link share.
+			 * Return the existing link share if this is a duplicate
+			 */
+			$existingShares = $this->shareManager->getSharesBy($this->currentUser->getUID(), \OCP\Share::SHARE_TYPE_LINK, $path, false, 1, 0);
+			if (!empty($existingShares)) {
+				return new \OC_OCS_Result($this->formatShare($existingShares[0]));
+			}
+
 			$publicUpload = $this->request->getParam('publicUpload', null);
 			if ($publicUpload === 'true') {
 				// Check if public upload is allowed
diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php
index ec270ef05ce9c673719fd1c3b54e9a2056bb5f44..da2e9ca10945187947c50c6dd9dff378610113ec 100644
--- a/build/integration/features/bootstrap/Sharing.php
+++ b/build/integration/features/bootstrap/Sharing.php
@@ -17,6 +17,9 @@ trait Sharing{
 	/** @var SimpleXMLElement */
 	private $lastShareData = null;
 
+	/** @var int */
+	private $savedShareId = null;
+
 	/**
 	 * @Given /^as "([^"]*)" creating a share with$/
 	 * @param \Behat\Gherkin\Node\TableNode|null $formData
@@ -422,5 +425,22 @@ trait Sharing{
 		}
 	}
 
+	/**
+	 * @When save last share id
+	 */
+	public function saveLastShareId()
+	{
+		$this->savedShareId = $this->lastShareData['data']['id'];
+	}
+
+	/**
+	 * @Then share ids should match
+	 */
+	public function shareIdsShouldMatch()
+	{
+		if ($this->savedShareId !== $this->lastShareData['data']['id']) {
+			throw new \Excetion('Expected the same link share to be returned');
+		}
+	}
 }
 
diff --git a/build/integration/features/sharing-v1.feature b/build/integration/features/sharing-v1.feature
index 8faffdd296503fb097358ed7c85837b3c5e89ca5..00e760ce1676a0c6994f2357fd94c9ffcdca5504 100644
--- a/build/integration/features/sharing-v1.feature
+++ b/build/integration/features/sharing-v1.feature
@@ -547,3 +547,15 @@ Feature: sharing
     When Updating last share with
       | permissions | 31 |
     Then the OCS status code should be "404"
+
+  Scenario: Only allow 1 link share per file/folder
+    Given user "user0" exists
+    And As an "user0"
+    And creating a share with
+      | path | welcome.txt |
+      | shareType | 3 |
+    When save last share id
+    And creating a share with
+      | path | welcome.txt |
+      | shareType | 3      |
+    Then share ids should match