簡體   English   中英

如何使用表單數據直接將多個文件上傳到Amazon S3?

[英]How to upload multi files to amazon S3 directly with the form data?

前端有一個這樣的表單,允許用戶插入視頻列表記錄。

<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>

每個記錄至少有2個視頻文件,最多4個文件。

問題是,在官方教程中,

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

該文件在上傳到s3之前是臨時存儲在我的服務器上,我想知道如何在PHP(或代碼點火器)中直接上傳到s3? 在開始上傳到s3之前,還要將“ list_name”發布到我的服務器上嗎?

非常感謝您的幫助。

唯一的方法是使用多格式

<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>

和使用jQuery上傳插件上傳

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM