2011-04-28 42 views
0

我在appcelerator論壇上提過這個問題,但沒有回覆。我也試圖用照片庫上傳照片,但失敗了。有人可以告訴我,通過鈦的照片庫上傳照片是否支持鈦?謝謝。我可以通過android的照片庫與鈦加速器上傳照片到服務器?

+0

什麼是您的服務器代碼的樣子?上傳圖像是一個簡單的http POST到您的服務器 – 2011-04-29 03:55:20

+0

我的服務器代碼是在php中使用$ _FILES。你是否意味着我可以在Android的照片庫中上傳圖片? – davidlee 2011-04-29 19:59:34

回答

0

我找不到關於這個問題的任何真正的官方文件,但根據這個。 https://github.com/appcelerator/KitchenSink/blob/master/Resources/examples/camera.js

var data = [ 
    {title:'Camera Basic', hasChild:true, test:'../examples/camera_basic.js'} 
]; 

if (Ti.Platform.osname == "iphone") { 
    data.push({title:'Camera Custom Overlay', hasChild:true, test:'../examples/camera_overlay.js'}); 
    data.push({title:'Camera Overlay Webview', hasChild:true, test:'../examples/camera_overlay_webview.js'}); 
    data.push({title:'Camera Augmented Reality', hasChild:true, test:'../examples/camera_ar.js'}); 
    data.push({title:'Save to Gallery (Auto)', hasChild:true, test:'../examples/camera_gallery.js'}); 
    data.push({title:'Save to File', hasChild:true, test:'../examples/camera_file.js'});  

    Ti.include('version.js'); 

    if (isiOS4Plus()) { 
     data.push({title:'Video Record', hasChild:true, test:'../examples/camera_video.js'}); 

     //TODO: this seems to work the first time, but not subsequent. fix for 1.5 
     //data.push({title:'Video Editing', hasChild:true, test:'../examples/video_edit.js'}); 
    } 
} 

似乎所有的工作相機功能,包括保存到文件設置爲iphone

但是你有這個網頁上閱讀起來,試了試這https://github.com/appcelerator/KitchenSink/blob/master/Resources/examples/xhr_fileupload.js