2016-03-23 13 views
0

應用程序工作流程正在使用cordova攝像頭getPicture並使用FileTransfer插件將圖片發送到服務器。Cordova FileTransfer請求負載窗體 - 數據名稱

我檢查FileTransfer請求負載。 ------ WebKitFormBoundarychEuzGerq8dmX5zq Content-Disposition:form-data;名稱= 「1」; filename =「IMG_20160322_211023.jpg」 Content-Type:image/jpeg

name =「1」。

然後取第二張照片的名稱=「2」。

我只是想知道是否有任何方法可以爲固定值設置此名稱?

請指教!

非常感謝!

+0

在哪個平臺上(S)爲這個問題出現? – daserge

回答

0

根據the plugin docs它應該可配置使用FileUploadOptionsfileKey

fileKey: The name of the form element. Defaults to file. (DOMString)