diff --git a/app/embeds/GoogleDrive.js b/app/embeds/GoogleDrive.js index 5ea353815..12bb07a2c 100644 --- a/app/embeds/GoogleDrive.js +++ b/app/embeds/GoogleDrive.js @@ -3,9 +3,7 @@ import * as React from "react"; import Image from "components/Image"; import Frame from "./components/Frame"; -const URL_REGEX = new RegExp( - "^https?://drive.google.com/file/d/(.*)/(preview|view).?usp=sharing(.*)" -); +const URL_REGEX = new RegExp("^https?://drive.google.com/file/d/(.*)$"); type Props = {| attrs: {| diff --git a/app/embeds/GoogleDrive.test.js b/app/embeds/GoogleDrive.test.js index c63d2ce42..7a91cb897 100644 --- a/app/embeds/GoogleDrive.test.js +++ b/app/embeds/GoogleDrive.test.js @@ -23,21 +23,6 @@ describe("GoogleDrive", () => { }); test("to not be enabled elsewhere", () => { - expect( - "https://drive.google.com/file/d/1ohkOgmE8MiNx68u6ynBfYkgjeKu_x3ZK/view".match( - match - ) - ).toBe(null); - expect( - "https://drive.google.com/file/d/1ohkOgmE8MiNx68u6ynBfYkgjeKu_x3ZK/preview".match( - match - ) - ).toBe(null); - expect( - "https://drive.google.com/file/d/1ohkOgmE8MiNx68u6ynBfYkgjeKu_x3ZK/view?usp=restricted".match( - match - ) - ).toBe(null); expect("https://drive.google.com/file".match(match)).toBe(null); expect("https://drive.google.com".match(match)).toBe(null); expect("https://www.google.com".match(match)).toBe(null);