简体   繁体   English

您可以通过浏览器将文件上传到github页面吗?

[英]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.

相关问题 您可以在Comet / APE环境中上传文件吗? - Can you upload files on a Comet/APE environment? 如何在浏览器中使用后退和前进按钮浏览页面而又不丢失NextJS中页面的状态? - how can you travel through pages in a browser with back and forward buttons without losing the pages' states in NextJS? 您可以通过JavaScript导航到浏览器中的锚点而不更新URL吗? - Can you navigate to an anchor in the browser via JavaScript without updating the URL? 您可以通过浏览器播放javascript的PCM音频流吗? - Can you play streamed in PCM audio in javascript via browser? 通过Ajax上传文件? - Upload files via Ajax? 在 Github 页面中通过 Pyodide 执行 Python - Executing Python via Pyodide in Github Pages maxFiles:1 错误后 dropzone“您无法再上传任何文件” - dropzone "You can not upload any more files" after error with maxFiles:1 您可以通过 JavaScript 或 php 将您在浏览器中所做的更改保存到本地 HTML 文件中吗? - Can you save changes that you make in the browser to your local HTML file via JavaScript or php? 我的 Javascript 文件未显示在 Github 页面上 - My Javascript Files are not showing up on Github Pages CSS 文件未在 github 页面上正确加载 - CSS files not loading correctly on github pages
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM