dongqing220586 2015-08-04 19:29
浏览 129
已采纳

如何使用表单数据直接将多个文件上传到amazon S3?

There is a form at the front-end like this to allow user insert a video list record.

<form action ="" method="post" enctype="multipart">
<input type="file" name="files[]">upload1
<input type="file" name="files[]">upload2
<input type="file" name="files[]">upload3
<input type="file" name="files[]">upload4
<input name="list_name" />
</form>

each record has at least 2 video files , and 4 files at max.

The problem is , From the offical tutorial,

https://github.com/aws/aws-sdk-php

The file is temporary store at my server before upload to s3 , I wonder how to upload directly to s3 in PHP ( or code-igniter )? Also post the 'list_name" to my server before start upload to s3 ?

Thanks a lot for helping.

  • 写回答

1条回答 默认 最新

  • douchongbang6011 2015-08-12 19:32
    关注

    The only way is to use multiform

    <form action ="" method="post" enctype="multipart">
    <input type="file" name="files[]">upload1
    </form>
    
    <form action ="" method="post" enctype="multipart">
    <input type="file" name="files[]">upload2
    </form>
    
    <form action ="" method="post" enctype="multipart">
    <input type="file" name="files[]">upload3
    </form>
    

    and upload using jquery upload plugin

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部