@glodon-aiot/react-components
Version:
aiot react components
24 lines (23 loc) • 579 B
TypeScript
/**
* DocumentViewer 工具函数
*/
/**
* 格式化文件大小
*/
export declare const formatFileSize: (bytes: number) => string;
/**
* 检查服务器是否支持 HTTP Range 请求
*/
export declare const checkRangeSupport: (url: string) => Promise<{
supportsRange: boolean;
fileSize: number;
}>;
/**
* 获取文件大小
*/
export declare const getFileSize: (url: string) => Promise<number>;
/**
* 规范化 URL,兼容已编码和未编码的 URL
* 确保 URL 始终是正确编码的格式
*/
export declare const normalizeUrl: (url: string) => string;