Google Drive isn't set up on the server, so nothing can be uploaded.
} +{error}
) : items === null ? ( @@ -272,6 +276,19 @@ export function FilePicker({ ); } +/* Files someone put in the Drive folder that Drive wouldn't share + with anyone who has the link, so they aren't listed. */ +export function RefusedNote({ names }: { names: string[] }) { + if (names.length === 0) return null; + return ( ++ In the Drive folder but not listed, because Drive wouldn't share {names.length === 1 ? "it" : "them"} with anyone + who has the link: {names.join(", ")}. Check the sharing settings (docs/google-drive-and-mail.md); they're tried + again every ten minutes. +
+ ); +} + /* "Choose a file" under a link field. */ export function ChooseFileButton({ value, onPick }: { value?: string | null; onPick: (file: DriveFile) => void }) { const [open, setOpen] = useState(false); diff --git a/src/lib/api.ts b/src/lib/api.ts index 3da1ecf..8be1f38 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -29,6 +29,13 @@ export class ApiError extends Error { } } +/* nginx's answers of its own, in words that point at the fix. */ +const NOT_THE_API: Record{error}
) : items === null ? ( @@ -217,7 +219,7 @@ export default function AdminMedia() {{tab === "images" ? "Uploaded images. Image fields in every editor pick from here." - : "Files in the shared Google Drive, for pages to link to. Link fields pick from here with Choose a file."} + : "Files in the shared Google Drive's Blog folder, for pages to link to, including any put there in Drive itself. Link fields pick from here with Choose a file."}