首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用App42上传图片

如何使用App42上传图片
EN

Stack Overflow用户
提问于 2017-03-01 12:30:42
回答 1查看 37关注 0票数 0

我有一个WebApi项目和一个安卓客户端,我需要使用App42从WebApi上传一些图像,问题是,在this教程中,它必须有一个StringPath,但我没有stringPath,因为图像将由安卓客户端为Api发送,然后保存这些图像。我是否必须从安卓系统以Base64格式发送图像,然后创建一个位图格式的tempFileObject,然后将stringPath放入其中?

代码语言:javascript
复制
String name = "MyPic";    
String userName = "Nick";    
String filePath = " file path from gallery /sd card";   
String fileType = "IMAGE";    
String description = "This is my holiday pic";  
Upload upload = uploadService.UploadFileForUser(name,userName,filePath,fileType,description);    
// File will get uploaded in App42 cloud with above snippet.      
IList<Upload.File> fileList =  upload.GetFileList();  // This will have only single file uploaded above  
for (int i = 0; i < fileList.Count; i++)    
{    
    Console.WriteLine("fileUrl is " + fileList[i].GetUrl());    
    //This will return uploaded file URL  
}
EN

回答 1

Stack Overflow用户

发布于 2017-07-17 15:06:55

如果我理解了这个查询,那么您没有将文件保存在设备的本地文件存储中。如果是,那么您可以使用another API,它将询问您图像的InputSteam作为参数。

我希望这能帮到你。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42523218

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档