我可以通过android的照片库与钛加速器上传照片到服务器?

我可以通过android的照片库与钛加速器上传照片到服务器?

问题描述:

我在appcelerator论坛上提过这个问题,但没有回复。我也试图用照片库上传照片,但失败了。有人可以告诉我,通过钛的照片库上传照片是否支持钛?谢谢。我可以通过android的照片库与钛加速器上传照片到服务器?

+0

什么是您的服务器代码的样子?上传图像是一个简单的http POST到您的服务器 – 2011-04-29 03:55:20

+0

我的服务器代码是在php中使用$ _FILES。你是否意味着我可以在Android的照片库中上传图片? – davidlee 2011-04-29 19:59:34

我找不到关于这个问题的任何真正的官方文件,但根据这个。 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