2015-06-17 29 views
-1

我想上傳多張圖片定位標籤點擊。我能夠使用ng-file-upload上傳多張圖片在主播上點擊

任何人都可以請建議我如何上傳錨標籤點擊多張圖片上DIV圖片上傳多張圖片標籤。

<a href=""><i class="fa fa-camera"></i></a> 

編輯

<a href=""> 
    <i class="fa fa-camera"> 
     <div type="file" ng-show="false" ngf-select ng-model="profilePic.profileImageUrl" ngf-max-size='2000000'> 
     <img ngf-src="profilePic.profileImageUrl[0]" ngf-default-src="../images/people/110/default_profile.png" height="100" width="100" class="fa fa-camera"></div> 
     </i> 
    </a> 
+0

任何努力使這項工作? – putvande

+0

@putvande,顯然是的 –

+0

你能告訴我們你曾經嘗試過嗎? – putvande

回答

0

https://github.com/stvnthomas/CodeIgniter-Multi-Upload

看看這個網站可以幫助你。

我也發現這個代碼,你需要做的是改變文件標籤陣列的名稱,如

<input type="file" name="userfile[]" multiple="multiple" class="btn btn-file"/> 

,然後你需要把上傳代碼到的foreach如下圖所示

foreach($_FILES['userfile'] as $file) 
{ 
    if (!$this->upload->do_upload($file)) { 
     $error = array('error' => $this->upload->display_errors()); 
     . 
     . 
     . 

     } 
} 

看看這可以幫助你。我是這個主題的新人,但我搜索了一段時間,這可以幫助你,我想。

+0

希望這可以幫助您解決一些問題 – Luis