d88feaaba8
* Add auth cookie to avoid using auth token in the url * Fix all download button * Refactor some of the places where we download file
9 lines
328 B
TypeScript
9 lines
328 B
TypeScript
import { DriveApiClient } from '@features/drive/api-client/api-client';
|
|
import { DriveItem } from '@features/drive/types';
|
|
|
|
|
|
export const onDriveItemDownloadClick = async (driveItem: DriveItem) => {
|
|
const url = await DriveApiClient.getDownloadUrl(driveItem.company_id, driveItem.id);
|
|
url && (window.location.href = url);
|
|
};
|