以表单上传多张照片

发布于 2024-10-16 19:33:01 字数 364 浏览 4 评论 0原文

我有一个照片上传表单,允许用户上传 1 张照片。但我的用户抱怨他们想要上传很多照片。我怎样才能允许他们这么做呢?

现在我有这个表格可供上传: http://www.hikingsanfrancisco.com/account/upload_hike_photos.php?hike_id=58

(我尝试粘贴代码,但不知何故它不起作用)

有什么想法如何最好地解决它?有没有办法循环遍历选定的文件? (我正在使用 PHP)

谢谢, 亚历克斯

I have a photo-upload form that allows a user to upload 1 photo. But my users are complaining that they want to upload many photos. How can I allow them to do that?

Right now I have this form for uploading:
http://www.hikingsanfrancisco.com/account/upload_hike_photos.php?hike_id=58

(I tried to paste code, but it didn't work somehow)

Any thoughts how to best go about it? Is there a way to loop through the selected files maybe? (I am using PHP)

Thanks,
Alex

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

懒的傷心 2024-10-23 19:33:01

添加更多用于上传文件的字段,我不知道,也许是文件或六个,上传按钮将通过 php 检查其中哪些字段具有开始上传的信息,一次 1 个或当然,在 php 循环中。

Add more fields for uploading files, I don't know, maybe file or six, and the upload button will check through php which of them have information to start the upload, 1 at a time or course, in a php loop.

三生一梦 2024-10-23 19:33:01

这是一个使用flash + javascript(MooTools)进行文件上传的插件。该插件的优点是它受支持,您可以 Github 它。它可以上传多张照片,限制最大大小等,并在上传之前验证文件信息。另外,还有使用 PHP 的后端示例,说明文件上传后如何处理。

Fancyupload

功能

  • 选择并上传多个文件
  • 在选择对话框中按类型过滤文件
  • 许多可能的事件
    添加您自己的行为
  • 在之前显示和过滤有用的文件信息
    上传开始
  • 按文件数量、类型或大小限制
  • 上传 平台和服务器独立,只需要 Flash9+(> 95% 渗透率),可在安装了该插件的所有浏览器上运行

这是 jQuery 插件,其功能与 MooTools 插件相同:

< a href="http://www.uploadify.com/documentation/" rel="nofollow">Uploadify

Here is a plugin that uses flash + javascript (MooTools) to do file upload. The upside to this plugin is that it's supported and you can Github it. It can have multiple photo uploads, limit max size, etc, and verify file information before upload. Also, has example for backend using PHP on how files are handled after it is uploaded.

Fancyupload

Features

  • Select and upload multiple files
  • Filter files by type in the select
  • dialog A lot of possible Events to
    add your own behaviour
  • Show and filter useful file information before
    the upload starts
  • Limit uploads by file count, type or size
  • Platform and server independent, just needs Flash9+ (> 95% penetration) which works on all browsers with it installed

Here is the jQuery plugin that does the same as the MooTools one:

Uploadify

醉生梦死 2024-10-23 19:33:01

添加新的文件输入。或者使用 swfuploader 之类的文件上传。

Add new file inputs. Or use smth like swfuploader for file uploading.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文