download url
This commit is contained in:
@@ -38,7 +38,9 @@ interface DocumentLike {
|
||||
correspondents?: Array<{ id?: string | number; name?: string }>;
|
||||
current_version?: {
|
||||
version_number?: number;
|
||||
download?: { url?: string | null; expires_at?: number } | null;
|
||||
version?: { content_type?: string | null } | null;
|
||||
filename?: string | null;
|
||||
} | null;
|
||||
documentLink?: {
|
||||
url: string;
|
||||
@@ -261,11 +263,8 @@ const DocumentViewerPanel: React.FC<DocumentViewerPanelProps> = ({
|
||||
if (!document) {
|
||||
return null;
|
||||
}
|
||||
const downloadPath = document.current_version?.download_path;
|
||||
if (!downloadPath) {
|
||||
return null;
|
||||
}
|
||||
const href = resolveApiPath ? resolveApiPath(downloadPath) : downloadPath;
|
||||
const downloadUrl = document.current_version?.download?.url;
|
||||
const href = resolveApiPath ? resolveApiPath(downloadUrl) : downloadUrl;
|
||||
if (!href) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user