This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const domain = 'domain' | |
| const secret = 'supersecret' | |
| const expire = Math.round(Date.now() / 1000) + 120 | |
| const links: { original?: string } = {} | |
| const path = `/${this.filetype}/${this.uid}.${this.fileext}` | |
| const generateToken = ({ path, query = '' }: { path: string; query?: string }): string => { | |
| // generate md5 token | |
| const md5String = crypto |
OlderNewer