Spaces:
Configuration error
Configuration error
Download frontend/src/utils/convert-file-to-text.ts from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 250 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/utils/convert-file-to-text.ts
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/utils/convert-file-to-text.ts
-
curl -L -o convert-file-to-text.ts https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/utils/convert-file-to-text.ts
250 Bytes
| export const convertFileToText = async (file: File) => { | |
| const reader = new FileReader(); | |
| return new Promise<string>((resolve) => { | |
| reader.onload = () => { | |
| resolve(reader.result as string); | |
| }; | |
| reader.readAsText(file); | |
| }); | |
| }; | |