是否可以使用包含所有要上传文件的路径的文本文件上传多个文件?
有没有办法使用单个文件上传多个文件?...基本上我想一次上传多个 pdf 文件,使用一个包含每个 pdf 文件路径的文件...并将信息存储到mysql数据库...
PS:我不想将所有文件合并成1个巨大的pdf...我希望将每个pdf文件立即上传到服务器目录,然后将文件信息存储到数据库,例如。路径,文件信息,文件名供以后使用..
Is there any way to upload multiple files using a single file?...basically i want to upload multiple pdf files at once, using one single file that contains the path to each one of the pdf files...and store the information to mysql database...
PS: i dont want to merge all the files into 1 huge pdf...i want each 1 of pdf file to be uploaded to server dir at once and then store the file info to database eg. path, file info, filename for later use..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为了上传文件,用户必须手动选择该文件。这是一种安全措施(否则网站可以在您不知情的情况下检查您计算机上的任意文件,这会很糟糕)。
In order for a file to be uploaded, the user has to select that file manually. It's a security measure (otherwise websites could examine arbitrary files on your computer without your knowledge, which would be bad).
否 - 因为它会破坏 Javascript 沙箱模型(即会出现安全问题)。
No - Because it would break the Javascript sandbox model (i.e. would be a security problem).
出于安全考虑,很难通过 javascript 来做到这一点,这意味着您将可以访问其他本地文件。
为什么不直接将它们打包成 zip 文件,然后在服务器端解压缩呢?
For security concern, it's hard to do this by javascript, which means you will have the access to others local files.
Why not just pack them up into a zip file then unzip on the sever side?