AWS s3如何使用jquery html上传图像

时间:2017-04-19 14:11:12

标签: jquery html amazon-s3

如何使用jquery和html将图像上传到AWS s3。 我有一个html表单,但无法将其上传到aws而不是我没有得到很多确切的例子。

对这个woulb的任何帮助都很棒。

//代码。

<div class="modal fade add-trx-docs" id="addDocuments" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
      <form class="docs-form" onsubmit="return false">
        <div class="modal-header"> 
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Add docs</h4>
        </div>

        <div class="modal-body">
          <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 lp-row">
              <div class="col-md-4 col-lg-4 col-sm-4 col-xs-12">
                Select types: 
              </div>
              <div class="col-md-8 col-lg-8 col-sm-8 col-xs-12">
                <select name="add-trx-docs" class="add-trx-docs" >
                  <option value="">Select Type Of Docs</option>
                  <?php
                  foreach($getDocsType as $docs)
                  {
                    $isSelected = ($docs['docType_ID']?true:false);
                  ?>  

                  <option value="<?php echo $docs['docType_ID'];?>" class="add-trx-docs-id">
                    <?php echo $docs['docType_name'];?>
                  </option>
                  <?php
                    }
                  ?>
                </select>
                <input type="hidden" name="add-trx-docs-id" value="">
              </div>
            </div>
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 lp-row">
              <div class="col-md-4 col-lg-4 col-sm-4 col-xs-12">
                Choose Documents: 
              </div>
              <div class="col-md-6 col-lg-6 col-sm-6 col-xs-12">
                <div class="form-group">
                  <div class='input-group' id="trx-add-docs" class="trx-add-docs" required="required" >
                    <input type="hidden" id="trx-add-docs" name="trx-add-docs" value="" />
                    <input type="file" id="myDocFile">
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="v3-button trx-docs-button" name="trx-docs-id" value="" >Save</button>
        </div>
      </form>
    </div>
  </div>
</div>

0 个答案:

没有答案