1
我正在使用僞造文件模塊嘗試上傳圖庫中的圖像。 Forge運行在Android 2.3上,圖像選擇捕獲位工作正常。但是當我嘗試使用Request.Ajax()發送文件時,我得到一個僞造的異常。通過trigger.io僞造上傳文件
我甩輸出從催化劑日誌下面
Request URL:forge.request.ajax
Request Method:undefined
Status Code:400 error
{ url: 'http://example.com/',
username: null,
password: null,
data: null,
headers: { Accept: '*/*', 'Content-Type': 'image/jpg' },
timeout: 60000,
type: 'POST',
boundary: null,
files:
[ { uri: 'content://media/external/images/media/212#Intent;end',
name: 'Image',
height: 500,
width: 500 } ],
fileUploadMethod: 'raw' } // <- got this from a blog post,
這是我回報
{ type: 'UNEXPECTED_FAILURE',
message: 'Forge Java error: FileNotFoundException: http://example.com/' }
我已經檢查服務器端,並確認那裏得到任何問題那裏(做了一個測試腳本在那裏發佈)。如果我刪除文件附加調用,應用程序將發佈到服務器。
我看了示例代碼張貼在這裏,但它似乎是使用舊的API,我無法找到一些方法 - https://github.com/trigger-corp/photo-log/blob/master/photolog.js
難道我做錯什麼在文件調用?
謝謝,它似乎現在工作。如果我弄清楚爲什麼它可能會被打破,我會提出更多的細節。畢竟可能是服務器問題。 – JohnP