{"id":19042054,"url":"https://github.com/writetome51/get-data-url","last_synced_at":"2026-06-25T07:31:25.845Z","repository":{"id":122062392,"uuid":"235480969","full_name":"writetome51/get-data-url","owner":"writetome51","description":"Async function that returns data URL generated from a File","archived":false,"fork":false,"pushed_at":"2020-08-07T22:28:27.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-03T09:48:00.626Z","etag":null,"topics":["data-url","file"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/writetome51.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-22T02:07:16.000Z","updated_at":"2020-08-07T22:28:30.000Z","dependencies_parsed_at":"2023-07-22T18:16:03.512Z","dependency_job_id":null,"html_url":"https://github.com/writetome51/get-data-url","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-data-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-data-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-data-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-data-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writetome51","download_url":"https://codeload.github.com/writetome51/get-data-url/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240100512,"owners_count":19747683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-url","file"],"created_at":"2024-11-08T22:34:18.061Z","updated_at":"2026-05-08T20:30:18.538Z","avatar_url":"https://github.com/writetome51.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# getDataURL(file: Blob): Promise\u0026lt;string\u0026gt;\n\nAn async function that returns a data URL generated from `file`.\n\n\n## Example\nDemonstrates usage in an Angular project:\n\n```html\n\u003c!--  \n// example.component.html\nGet a File from a file \u003cinput\u003e and pass it to a component method:  \n--\u003e\n\u003cp\u003eChoose file to generate data url from:\u003c/p\u003e\n\u003cinput type=\"file\"  (change)=\"addToURLs($event.target.files[0])\"/\u003e\n```\n\n```ts\n// example.component.ts:\n\nexport class ExampleComponent {\n    dataURLs = [];\n\n    async addToURLs(file) {\n        let url = await getDataURL(file); // extracts url\n        this.dataURLs.push(url);\n    }\n}\n```\n\n## Installation\n```bash\nnpm i  @writetome51/get-data-url\n```\n\n## Loading\n```js\nimport {getDataURL} from '@writetome51/get-data-url';\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Fget-data-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritetome51%2Fget-data-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Fget-data-url/lists"}