{"id":27204466,"url":"https://github.com/simonrolph/photo-to-api-app","last_synced_at":"2026-01-21T05:38:07.032Z","repository":{"id":274448770,"uuid":"922934305","full_name":"simonrolph/photo-to-api-app","owner":"simonrolph","description":"Takes a picture, sends it to an API","archived":false,"fork":false,"pushed_at":"2025-01-27T11:08:47.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T22:58:24.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonrolph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-27T11:00:28.000Z","updated_at":"2025-01-27T11:08:51.000Z","dependencies_parsed_at":"2025-01-27T12:37:29.273Z","dependency_job_id":null,"html_url":"https://github.com/simonrolph/photo-to-api-app","commit_stats":null,"previous_names":["simonrolph/photo-to-api-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrolph%2Fphoto-to-api-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrolph%2Fphoto-to-api-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrolph%2Fphoto-to-api-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrolph%2Fphoto-to-api-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonrolph","download_url":"https://codeload.github.com/simonrolph/photo-to-api-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125572,"owners_count":21051767,"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":[],"created_at":"2025-04-09T22:58:26.563Z","updated_at":"2026-01-21T05:38:07.009Z","avatar_url":"https://github.com/simonrolph.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Photo --\u003e API minimal web app\n\nThis is a lightweight web application that allows users to take a photo using their device's camera and upload the captured image to an API. Initial starting code was generated by ChatGPT\n\n## Features\n\n- Access the device's camera directly from the browser.\n- Capture a still image from the live video stream.\n- Preview the captured photo.\n- Upload the photo to a specified API endpoint.\n\n## Requirements\n\n- A modern browser that supports `getUserMedia` (e.g., Chrome, Firefox, Edge, Safari).\n- The device must have a camera.\n- HTTPS is required for accessing the camera on most browsers.\n\n## How to Use\n\n1. **Open the App**: Load the `index.html` file in a browser.\n2. **Grant Camera Permission**: Allow the browser to access your camera when prompted.\n3. **Capture Photo**: Click the \"Capture Photo\" button to take a picture.\n4. **Upload Photo**: Click the \"Send Photo\" button to upload the captured image to the API.\n5. **View Status**: The status message will display whether the upload was successful or failed.\n\n## File Structure\n\n```\nCamera-Capture-App/\n|-- index.html     # The main HTML file for the application.\n```\n\n## Customisation\n\n### Changing the API Endpoint\nTo change the API where the image is uploaded, update the following line in the `index.html` file:\n```javascript\nconst apiUrl = 'https://your-api-endpoint.com/upload';\n```\nReplace `'https://your-api-endpoint.com/upload'` with the URL of your API endpoint.\n\n### Adjusting Image Format\nThe app captures images in PNG format by default. To change the format, modify this line:\n```javascript\nconst photo = canvas.toDataURL('image/png');\n```\nReplace `'image/png'` with `'image/jpeg'` or any other supported format.\n\n## Troubleshooting\n\n- **Camera Not Accessible**: Ensure the browser has permission to access the camera. If using a laptop, ensure no other application is using the camera.\n- **Upload Fails**: Verify the API endpoint is correct and supports receiving the image data.\n- **HTTPS Requirement**: The app must be served over HTTPS (or localhost) for the camera to work on most browsers.\n\n## Known Limitations\n\n- The app does not store or cache the image locally.\n- No advanced image editing or cropping features are provided.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonrolph%2Fphoto-to-api-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonrolph%2Fphoto-to-api-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonrolph%2Fphoto-to-api-app/lists"}