嗨,我在使用angularjs和flowjs上傳和保存圖像方面遇到了一些問題。如何使用ng-flow保存上傳的圖像VB.NET
我是新來的angularjs,有我的問題試圖做一個圖像上傳,但我得到它與ng-flow一起工作,仍然有一些問題試圖將圖像保存到一些設計路徑。
一個例子和類似的問題是這個How and where save uploaded files with ng-flow?,但我仍然無法使它的工作。
下面是上傳和預覽代碼,做工精細到目前爲止好:
<div class="ng-scope add-file" flow-init="{target:'../WebService/WebService.asmx/setImage'}"
flow-name="image.flow" flow-files-submitted="$flow.upload()"
flow-file-added="!!{png:1,gif:1,jpg:1,jpeg:1}[$file.getExtension()]">
<div class="row" style="margin-top: 0px!important;">
<div class="col-sm-10">
<p><label for="image">ADD PHOTO</label></p>
<table style="border: 0px;">
<tr>
<td ng-repeat="file in $flow.files" class="ng-scope thumbnail" style="margin: 3px 3px 3px 3px;">
<div class="text-right">
<a class="glyphicon glyphicon-remove" ng-click="file.cancel()"
style="color:#ff4b4b; text-decoration: none!important;"></a>
</div>
<div class="frame" ng-show="$flow.files.length" style="min-width: 210px!important;">
<span class="helper"></span>
<img flow-img="file" src="" class="image-thumbnail">
</div>
<div class="progress progress-striped" ng-class="{active: file.isUploading()}">
<div class="progress-bar" role="progressbar" aria-valuenow="100" aria-valuemin="0"
aria-valuemax="100" ng-style="{width: (file.progress() * 100) + '%'}">
</div>
<span class="sr-only ng-binding">1% Complete</span>
</div>
</td>
</tr>
</table>
</div>
<div class="col-sm-2 text-right drop" flow-drop="" ng-class="dropClass">
<span class="file-upload btn btn-primary" flow-btn="">
Choose file
<input type="file" multiple="multiple" style="visibility: hidden; position: absolute;">
</span>
</div>
</div>
但這裏的問題,我不知道如何或怎樣做才能創造這個形象在一些路徑...
我傳遞給NG-流初始化我的web服務方法,因爲它會通過URL參數發送這樣的:
flow-init="{target:'../WebService/WebService.asmx/setImage'}"
和WS收到類似於下面的示例:
../setImage?flowChunkNumber=1&flowChunkSize=1048576&flowCurrentChunkSize=198637&flowTotalSize=198637&flowIdentifier=198637-1jpg&flowFilename=1.jpg&flowRelativePath=1.jpg&flowTotalChunks=1
'flowChunkNumber=1
'flowChunkSize=1048576
'flowCurrentChunkSize=111168
'flowTotalSize = 111168
'flowIdentifier=111168-Figura1png
'flowFilename=Figura1.png
'flowRelativePath=Figura1.png
'flowTotalChunks = 1
我應該做的這些信息或者我需要什麼來發送數據(二進制,基數64等),保存/上創造的形象是什麼我服務器?
編輯1:我已經知道我需要的文件數據,並計算過,我確實需要一個upload.php的改造和發送文件。 還想不到如何爲vb.net創建upload.php