[英]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. 我正在尝试设计一个音乐网站,其中涉及用户上传mp3文件并共享它们。 Is it possible to do this with Github Pages or would I need a different hosting service?
Github Pages可以做到这一点吗?还是我需要其他托管服务? Like if I created a submit button with javascript, could the files be stored in the github repo?
就像我用javascript创建了一个提交按钮一样,文件是否可以存储在github仓库中?
Thanks. 谢谢。
GitHub Pages is designed to handle only static sites. GitHub Pages设计为仅处理静态站点。 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.
虽然可以使用JavaScript,但是为了使您的概念安全地工作,您需要某种服务器端代码来上传文件,而GitHub Pages则无法实现。
In addition, GitHub and Git aren't a good fit for storing things like user uploads which don't generally need versioning. 此外,GitHub和Git不太适合存储用户上传的内容,这些内容通常不需要版本控制。 Some sort of file or object storage would be a better fit and perform much better.
某种文件或对象存储将更合适并且性能更好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.