{"id":20800178,"url":"https://github.com/octagon-simon/oshare","last_synced_at":"2026-05-03T01:31:24.808Z","repository":{"id":64535725,"uuid":"544281620","full_name":"Octagon-simon/oshare","owner":"Octagon-simon","description":"Oshare is a web app that allows you to upload a file, copy the generated link, and then share the link to the uploaded file.","archived":false,"fork":false,"pushed_at":"2023-05-22T07:22:02.000Z","size":1556,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-20T02:49:06.813Z","etag":null,"topics":["cuttly","cuttly-api","file-sharing","file-upload","mysql","php","react","react-dropzone","reactjs"],"latest_commit_sha":null,"homepage":"https://oshare.firegist.com.ng","language":"JavaScript","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/Octagon-simon.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":"2022-10-02T04:45:44.000Z","updated_at":"2023-03-07T11:40:20.000Z","dependencies_parsed_at":"2025-01-18T12:32:03.083Z","dependency_job_id":null,"html_url":"https://github.com/Octagon-simon/oshare","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Octagon-simon/oshare","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Octagon-simon%2Foshare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Octagon-simon%2Foshare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Octagon-simon%2Foshare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Octagon-simon%2Foshare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Octagon-simon","download_url":"https://codeload.github.com/Octagon-simon/oshare/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Octagon-simon%2Foshare/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32555836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T00:31:16.350Z","status":"ssl_error","status_checked_at":"2026-05-03T00:31:15.546Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cuttly","cuttly-api","file-sharing","file-upload","mysql","php","react","react-dropzone","reactjs"],"created_at":"2024-11-17T18:12:33.308Z","updated_at":"2026-05-03T01:31:24.785Z","avatar_url":"https://github.com/Octagon-simon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oshare\n\nOshare is a web app that allows you to upload a file, copy the link, and then share the link to the uploaded file instead.\n\n![oshare new](https://user-images.githubusercontent.com/68190998/206370440-f0addbd1-f53c-4173-b998-e46fa75176e8.png)\n\n## ✅ SOLUTION\n\nSupposing you have a file that you wish to share with 50 people and you don't want to spend time sending this file to each of them individually, \nuse **oshare** to upload the file, then **a link** and **QR code** will be generated and all you have to do is to send them this link instead and they will be able to download the file.\n\n![image](https://user-images.githubusercontent.com/68190998/206370358-91d923a8-46a0-4697-b33a-8dd3975b1116.png)\n\n\u003e To ensure there is room for more, all uploaded files last for `24 hours` from when it was uploaded\n\n![image](https://user-images.githubusercontent.com/68190998/206371600-20cfe799-a87f-41ce-8507-6d82a9e81b06.png)\n\n## ✨ INSPIRATION \n\nI have always been a victim of unecessary burning of data when I want to share a file to a group of people. \nSo I developed Oshare to help me save more data and to ensure that more people can get access to the file.\n\n## 🐱‍👤 STACK\n\nWhat technologies were used to build Oshare?\n\n- ReactJS\n- JavaScript\n- PHP\n- MySQL\n- Cuttly (URL Shortening service)\n\n## ✍ THINGS I LEARNT\n\nWhenever I build a project, I learn new things and also update my exisiting knowledge.\n\nWell, here are the new things that I learnt in this project\n\n- You can't directly mutate a file input. \n \n    In as much as we mutate other fields by directly assigning a value to them using JavaScript, in a file input, you have to create a new instance of a `DataTransfer()` object, mutate the object and then reassign the files from this object to the file input.\n\n- You can't remove a node after it has been rendered by `react`\n- Figured out a better way to handle drag and drop in react using `React Dropzone`\n- You can't use the `download` atttribute on an anchor tag to download a file that is not on the same server. So you must create an Object URL that will handle the download\n- If you are running your react app on **strict mode**, it will force your components to be rendered twice.\n   \n    This was a problem for me because my `ajax` requests were being sent twice and thus performing multiple database operations.\n- Some people using this app may not be on the same timezone as the server, So I have implemented a way to properly handle files uploaded based on the timezones of the users.\n- Lastly, You can't figure it out all alone! Reach out to your mentors and tutors and they will guide you 💝\n\n## 👩‍🏫 HOW TO INSTALL\n\n\u003e Make sure you have php, sql, apache, npm and node installed on your system.\n\n### FRONTEND\n\nExtract this repository into a folder on your local development environment.\n\nCd into the folder `/frontend` and run the commands below to install the necessary dependencies\n\n```\n$ npm i\n```\n\n### SERVER\n\nImport the sql file `oshare.sql` into phpmyAdmin. This will create the necessary database and tables\n\nNow head over to `/server/api/core/env_sample.php` and modify the constants below\n\n- CUTTLY_API : This is your Cuttly API key. [Obtain one from Cuttly](https://cutt.ly/)\n- ORIGIN: This is the web address that is allowed to make requests to the api\n- DB_HOST, DB_USER, DB_PASS, AND DB_NAME: This is the database host, database user, database user password and database name\n- DOWNLOAD_URL : This is a link to the live hosted Api folder.\n\nOnce you have modified the file, save it and rename it to `env.php`\n\nNow copy the API folder in `./server/` to your `www` or `htdocs` folder. \n\n\u003e Make sure that the `www` or `htdocs` folder serves PHP scripts properly.\n\n\u003e If you are confused, take a look at how to set up a local development server (LAMP, WAMP OR XAMPP)\n\nNow create a `.env` file inside the `./frontend` folder and add the line below\n\n```\nVITE_BACKEND_URL = YOUR_API_FOLDER\n``` \n\n\u003e Make sure **YOUR_API_FOLDER** reflects the path to your API folder. \n\nOnce you are done, use the command below to fire up the server\n\n```\n$ npm run dev\n```\n\n## THANK YOU\n\nOshare was **once** developed with a *no-code* platform (wappler). \n\nBut I was kicked out of their community because I had issues with their software and they discovered that I was not a paid member. \n\nThen they asked me rudely, to learn how to code and I did just that 😃\n\nOshare stands to be my last personal project for the year **2022**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctagon-simon%2Foshare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctagon-simon%2Foshare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctagon-simon%2Foshare/lists"}