UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

18 lines 769 B
import { FileHandleAssociateType } from '@sage-bionetworks/synapse-types'; type DirectDownloadHandlerProps = { fileHandleId: string; associatedObjectId: string; associatedObjectType: FileHandleAssociateType; }; /** * Returns a 'downloadFile' function that fetches a presigned URL for a file * handle and opens it in the browser to trigger a direct download. * * To bypass Safari's popup blocker, this function must be invoked * within a user-triggered event handler (ex, inside an onClick callback). */ export declare function useDirectDownloadHandler(): { downloadFile: ({ fileHandleId, associatedObjectId, associatedObjectType, }: DirectDownloadHandlerProps) => Promise<void>; }; export {}; //# sourceMappingURL=useDirectDownloadHandler.d.ts.map