简体   繁体   English

文件夹和子文件夹中的多个文件

[英]Multiple files from folder and subfolder

I'm making a web-based video player.我正在制作一个基于网络的视频播放器。 I'm only able to copy-paste a single video link one by one...how can I copy-paste a whole folder video links through one command?我只能一个一个地复制粘贴一个视频链接...如何通过一个命令复制粘贴整个文件夹的视频链接? Means for each video(files) from folder or sub-folder I have to write video src ="" code...So how can I show each and every files on web page with just folder link copy pasted on html or something.意味着文件夹或子文件夹中的每个视频(文件)我必须编写视频 src =“”代码......那么我如何才能在 web 页面上显示每个文件,只需将文件夹链接副本粘贴在 html 或其他东西上。

It is not clear what you are trying to do, so I can't say which of these is the right fit, but:目前尚不清楚您要做什么,所以我不能说其中哪一个是合适的,但是:

  • You might consider the HTML Drag and Drop API , which lets you drag files from the OS desktop into a webapp.您可能会考虑使用HTML 拖放 API ,它允许您将文件从 OS 桌面拖到 web 应用程序中。 That will give you an array of files that you can then work with.这将为您提供一系列文件,然后您可以使用这些文件。
  • You might provide a <textarea> that lets a user paste a whole bunch of links, and assume that each line contains one URL.您可以提供一个<textarea>让用户粘贴一大堆链接,并假设每一行包含一个 URL。 Split that text on '\n' , and then you've got your array.'\n'上拆分该文本,然后你就得到了你的数组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM