I have a WebApi project and a Android client, and I need to upload some images from the WebApi using App42, the problem is, in this tutorial, it must have a StringPath, but I dont have a stringPath, because the image is gonna be send by the Android Client for the Api and then Save those images. Do I have to send the image from Android as Base64 and then create a tempFileObject as Bitmap and then put the stringPath?
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
}
If I understood the query then you don't have file saved in the device local file storage. If Yes, then you can use another API which will ask you the InputSteam of the image as parameter.
I hope this helps.