Noob
Noob

Reputation: 121

Can you upload files to github pages via browser?

I'm trying to design a music website that involves users uploading mp3 files and sharing them. Is it possible to do this with Github Pages or would I need a different hosting service? Like if I created a submit button with javascript, could the files be stored in the github repo?

Thanks.

Upvotes: 2

Views: 3488

Answers (1)

bk2204
bk2204

Reputation: 76864

GitHub Pages is designed to handle only static sites. While it is possible to use JavaScript, in order to make your concept work securely, you'd need some sort of server-side code to upload the files, which isn't possible on GitHub Pages.

In addition, GitHub and Git aren't a good fit for storing things like user uploads which don't generally need versioning. Some sort of file or object storage would be a better fit and perform much better.

Upvotes: 2

Related Questions