【发布时间】:2016-03-02 16:16:02
【问题描述】:
只是对相机图片的疑问(iOS/android/windows)
//take a picture
Ti.Media.showCamera({
saveToPhotoGallery:false,
success:function(event) {
if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {
$.preview.image = event.media;
//insert on attachments table
database.insert('attachments',{
name:'test',
extension:'',
file:Ti.Utils.base64encode(event.media).toString()
});
}
}
});
当我将图片发送到我的后台时,我还需要发送文件扩展名,但没有文件,只有我保存在本地 SQLite 表中的编码图片字符串。
如何获取此扩展程序,或者需要将图像保存在应用目录中?
【问题讨论】:
标签: image camera format appcelerator appcelerator-titanium