{"id":24064015,"url":"https://github.com/qeepsake/react-native-file-utils","last_synced_at":"2025-08-27T02:09:11.601Z","repository":{"id":41971222,"uuid":"431098956","full_name":"Qeepsake/react-native-file-utils","owner":"Qeepsake","description":"React Native utility library around image and video files for getting metadata like MIME type, timestamp, duration, and dimensions. Works on iOS and Android using Java and Obj-C, instead of Node 🚀.","archived":false,"fork":false,"pushed_at":"2023-10-12T13:12:18.000Z","size":933,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-10T13:08:57.805Z","etag":null,"topics":["dimensions","duration","exif-metadata","image","mime","mime-type","mimetype","react-native","video"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/Qeepsake.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2021-11-23T12:51:20.000Z","updated_at":"2024-08-31T13:59:29.000Z","dependencies_parsed_at":"2025-01-09T10:06:19.678Z","dependency_job_id":"7b63376b-da80-4a35-8065-705f894aa2aa","html_url":"https://github.com/Qeepsake/react-native-file-utils","commit_stats":{"total_commits":38,"total_committers":2,"mean_commits":19.0,"dds":0.1842105263157895,"last_synced_commit":"5007098554e1ce9fcb6d26764276b8f5f2e5d5b8"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qeepsake%2Freact-native-file-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qeepsake%2Freact-native-file-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qeepsake%2Freact-native-file-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qeepsake%2Freact-native-file-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qeepsake","download_url":"https://codeload.github.com/Qeepsake/react-native-file-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250484191,"owners_count":21438199,"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":["dimensions","duration","exif-metadata","image","mime","mime-type","mimetype","react-native","video"],"created_at":"2025-01-09T10:06:10.047Z","updated_at":"2025-04-23T17:45:15.695Z","avatar_url":"https://github.com/Qeepsake.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Qeepsake React Native File Utils\n\nExtracts information from image and video files including MIME type, duration (video), dimensions, and timestamp. The library work on iOS and Android and uses Java and Obj-C native library (not Node).\n\n## Installation\n\n```sh\nnpm install @qeepsake/react-native-file-utils\n```\n\n## Usage\n\n### Get the duration of video file\n\nGets the duration of the video in seconds.\n\n```js\nimport { getVideoDuration } from '@qeepsake/react-native-file-utils';\n\nconst durationMs = await getVideoDuration('file://\u003cmedia-path\u003e');\n```\n\n### Get the media file dimensions in pixels\n\nGets the horizontal (x) and vertical (y) pixels of the media item, either image or video. The returned media dimensions includes an object with both the horizontal (x) length in pixels and vertical (y) length in pixels.\n\n```js\nimport { getDimensions } from '@qeepsake/react-native-file-utils';\n\nconst mediaDimensions = await getDimensions('file://\u003cmedia-path\u003e', 'video');\n```\n\n### Get the MIME type of a media item file\n\nGets the MIME type of the media file at the passed Uri.\n\n```js\nimport { getMimeType } from '@qeepsake/react-native-file-utils';\n\nconst mimeType = await getMimeType('file://\u003cmedia-path\u003e');\n```\n\n### Get the timestamp of a media item file\n\nGets the string timestamp of the media file from the passed Uri. The timestamp is usually a date retrieved\nfrom either the Exif date if the original datetime of the media is available or by the creation/last modified\ntimestamp from the file itself.\n\n```js\nimport { getTimestamp } from '@qeepsake/react-native-file-utils';\n\nconst timestamp = await getTimestamp('file://\u003cmedia-path\u003e', 'video');\n```\n\n## Supported Schemes\n\nIn this table, you can see what type of URI can be handled by each method.\n\n| Method Name      | iOS                             | Android    |\n| -----------      | ----------------------          | ---------- |\n| getTimestamp     | `file://`, `assets-library://`  | `file://`, `content://`\n| getVideoDuration | `file://`                       | `file://`\n| getMimeType      | `file://`, `ph://`              | `file://`, `content://`\n| getDimensions    | `file://`,                      | `file://`\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqeepsake%2Freact-native-file-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqeepsake%2Freact-native-file-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqeepsake%2Freact-native-file-utils/lists"}