File Upload Service

This module allows you to upload files to the cloud that can later be accessed through their respective URLs. Uploading files to the cloud is especially useful for Mobile/Device Apps as this minimizes the App footprint on the device.

Import Statement

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
import com.shephertz.app42.paas.sdk.android.ServiceAPI;
import com.shephertz.app42.paas.sdk.android.App42Response;
import com.shephertz.app42.paas.sdk.android.App42Exception;
import com.shephertz.app42.paas.sdk.android.App42BadParameterException;
import com.shephertz.app42.paas.sdk.android.App42NotFoundException;
import com.shephertz.app42.paas.sdk.android.upload.Upload;
import com.shephertz.app42.paas.sdk.android.upload.UploadFileType;
import com.shephertz.app42.paas.sdk.android.upload.UploadService;
using com.shephertz.app42.paas.sdk.windows;  
using com.shephertz.app42.paas.sdk.windows.upload;   
#import "Shephertz_App42_iOS_API/Shephertz_App42_iOS_API.h"   
import com.shephertz.app42.paas.sdk.jme.ServiceAPI;
import com.shephertz.app42.paas.sdk.jme.App42Response;
import com.shephertz.app42.paas.sdk.jme.App42Exception;
import com.shephertz.app42.paas.sdk.jme.App42BadParameterException;
import com.shephertz.app42.paas.sdk.jme.App42NotFoundException;
import com.shephertz.app42.paas.sdk.jme.upload.Upload;
import com.shephertz.app42.paas.sdk.jme.upload.UploadFileType;
import com.shephertz.app42.paas.sdk.jme.upload.UploadService;
import com.shephertz.app42.paas.sdk.java.ServiceAPI;
import com.shephertz.app42.paas.sdk.java.App42Response;
import com.shephertz.app42.paas.sdk.java.App42Exception;
import com.shephertz.app42.paas.sdk.java.App42BadParameterException;
import com.shephertz.app42.paas.sdk.java.App42NotFoundException;
import com.shephertz.app42.paas.sdk.java.upload.Upload;
import com.shephertz.app42.paas.sdk.java.upload.UploadFileType;
import com.shephertz.app42.paas.sdk.java.upload.UploadService;
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.upload;  
<script type="text/javascript" src="App42-all-x.x.x.min.js">&lt;/script>
local App42API = require("App42-Lua-API.App42API")
local ACL= require("App42-Lua-API.ACL") 
require("App42-Lua-API.UploadFileType") 
require("App42-Lua-API.Permission")
#include "App42API.h"
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.upload;  
include_once '../App42Response.php';  
include_once '../App42Exception.php';  
include_once '../App42BadParameterException.php';  
include_once '../App42NotFoundException.php';
include_once '../App42Log.php';  
include_once '../UploadService.php'; 
Coming Soon
require 'App42_Ruby_API'
import com.shephertz.app42.paas.sdk.as3.App42API;
import com.shephertz.app42.paas.sdk.as3.App42Response;
import com.shephertz.app42.paas.sdk.as3.App42Exception;
import com.shephertz.app42.paas.sdk.as3.App42BadParameterException;
import com.shephertz.app42.paas.sdk.as3.App42NotFoundException;	
import com.shephertz.app42.paas.sdk.as3.upload.Upload;
import com.shephertz.app42.paas.sdk.as3.upload.UploadFile;
import com.shephertz.app42.paas.sdk.as3.upload.UploadService;
Coming Soon

Initialize

In order to use various the functions available in a specific API, a developer has to initialize with App42API by passing the apiKey and secretKey which will be created after the app creation from AppHQ dashboard.

Required Parameters

apiKey - The Application key given when the application was created. secretKey - The secret key corresponding to the application key given when the application was created.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; 
App42API.initialize("API_KEY","SECRET_KEY");
App42API.initialize("API_KEY","SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
App42.initialize("API_KEY","SECRET_KEY");
App42API:initialize("API_KEY", "SECRET_KEY")
App42API::Initialize("API_KEY", "SECRET_KEY");

App42API.Initialize("API_KEY","SECRET_KEY");
App42API::initialize("API_KEY","SECRET_KEY");
Coming Soon
api = App42RubyAPI::ServiceAPI.new("API_KEY","SECRET_KEY")
App42API.initialize("API_KEY","SECRET_KEY");
Coming Soon

Build Service

After initialization, developer needs to call the buildXXXService method on App42API to get the instance of the particular API that you wish to build. For example, To build an instance of UploadService, buildUploadService() method needs to be called.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
UploadService uploadService = App42API.buildUploadService(); 
UploadService uploadService = App42API.BuildUploadService();  
UploadService *uploadService = [App42API buildUploadService]; 
UploadService uploadService = App42API.buildUploadService(); 
UploadService uploadService = App42API.buildUploadService(); 
UploadService uploadService = App42API.BuildUploadService(); 
var uploadService  = new App42Upload();
local uploadService  = App42API:buildUploadService()
UploadService *uploadService = App42API::BuildUploadService();
UploadService uploadService = App42API.BuildUploadService(); 
$uploadService = App42API::buildUploadService();
Coming Soon
upload_service = api.build_upload_service
var uploadService:UploadService = App42API.buildUploadService();
Coming Soon

Upload File

Uploads file on the cloud.

Required Parameters

fileName - The name of the file which has to be saved. It is used to retrieve the file. filePath - The local path for the file. fileType - The type of the file.The file can be either Audio, Video, Image, Binary, Txt, xml, json, csv or other. Use the static constants e.g. UploadFileType.AUDIO, UploadFileType.XML etc. description - Description of the file to be uploaded.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String fileName = "<Your_file_name>";
String description = "File Description";    
String filePath = "Your Local File Path";
UploadFileType fileType = UploadFileType.IMAGE;    
uploadService.uploadFile(fileName, filePath, fileType, description,	new App42CallBack() {
	public void onSuccess(Object response)
	{
		Upload upload = (Upload)response;						
		ArrayList<Upload.File>  fileList = upload.getFileList();   
		for(int i = 0; i < fileList.size();i++ )  
		{  
			System.out.println("fileName is :" + fileList.get(i).getName());  
			System.out.println("fileType is :" + fileList.get(i).getType());  
			System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
			System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
			System.out.println("fileDescription is: " + fileList.get(i).getDescription()); 
		}
	}
	public void onException(Exception ex) 
	{
		System.out.println("Exception Message"+ex.getMessage());	
	}
});
    Not Available
NSString *fileName = @"FileName.ext";
NSString *description = @"File Description";
NSString *filePath = @"Your Local File Path";
NSString *fileType = "<Your_file_type>"; 
Upload *upload = [uploadService uploadFile:fileName filePath:filePath uploadFileType:@fileType fileDescription:description]; 
NSLog(@"fileName is %@" , [(File *)[upload.fileListArray objectAtIndex:0] name]);
NSLog(@"fileType is %@" , [(File *)[upload.fileListArray objectAtIndex:0] type]);
NSLog(@"fileDescription is %@" , [(File *)[upload.fileListArray objectAtIndex:0] description]);
NSString *jsonResponse = [upload toString]; 
	  Not Available
String fileName = "<Your_file_name>";
String description = "File Description";	
String filePath = "Your Local File Path";	
UploadFileType fileType = UploadFileType.IMAGE;  
Upload upload = uploadService.uploadFile(fileName, filePath, fileType, description);
ArrayList<Upload.File>  fileList = upload.getFileList();
for(int i = 0; i < fileList.size();i++ )
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription());  
}
String fileName = "<Your_file_name>";
String description = "File Description";    
String filePath = "Your Local File Path";
String fileType = "<Your_file_type>";  
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.UploadFile(fileName, filePath, fileType, description, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;   
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
	        App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
        	App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
        	App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var fileName = "<Your_file_name>",
description = "File Description",
filePath = "Your Local File Path",	
fileType = "<Your_file_type>";  
result ;  
uploadService.uploadFile(fileName, filePath, fileType, description,{  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		console.log("name is " +uploadObj.app42.response.upload.files.file.name)
		console.log("file type is"+uploadObj.app42.response.upload.files.file.type)
		console.log(" url is" +uploadObj.app42.response.upload.files.file.url))
	},  
	error: function(error) {  
	}  
}); 
local fileName = "<Your_file_name>";
local description = "File Description";    
local filePath = "Your Local File Path";
local fileType = "<Your_file_type>"; 
local App42CallBack = {}
uploadService:uploadFile(fileName,filePath ,fileType,description,App42CallBack)
function App42CallBack:onSuccess(object)   
	print("fileName is :".. object:getFileList():getName()); 
	print("Type is :".. object:getFileList():getType());     
	print("Url is :".. object:getFileList():getUrl());  
	print("fileDescription is: ".. object:getFileList():getDescription());         
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* fileName = "<Your_file_name>";
const char* filePath = "Your Local File Path";
const char* description = "File Description";
FileType fileType = IMAGE;
uploadService->UploadFile(fileName, filePath, fileType, description, this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
            printf("\n CreatedOn=%s",it->createdOn.c_str());
        }
        
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}    

String fileName = "<Your_file_name>";
String description = "File Description";	
String filePath = "Your Local File Path";	
String fileType = "<Your_file_type>";  
Upload upload = uploadService.UploadFile(fileName, filePath, fileType, description); 
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
$fileName = "<Your_file_name>";	
$fileType = "<Your_file_type>";	
$filePath = "Your Local File Path";	
$description = "File Description";
$upload = $uploadService->uploadFile($fileName, $filePath, $fileType, $description); 
$fileList = $upload->getFileList();
foreach($fileList as $files )
{
	print_r("FileName is : ".$files->getName());
	print_r("Type is : ".$files->getType() );
	print_r("Url is : ".$files->getUrl() );
	print_r("TinyUrl is: ".$files->getTinyUrl() );
	print_r("Description is: ".$files->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
fileName = "<Your_file_name>";
filePath = "Your Local File Path";	
fileType = App42::Upload::UploadFileType.new();
upload_file_type = fileType.enum("IMAGE");
description = "File Description";
upload = upload_service.upload_file(fileName,filePath,upload_file_type,description); 
fileList = Array.new();
	for file in fileList do
		puts "fileName is #{file.name}";
		puts "fileType is #{file.type}";
		puts "url is #{file.url}";
		puts "description is #{file.description}";
	end
jsonResponse = upload.to_s(); 
var fileName:String = "<Your_file_name>";  
var description:String = "File Description";      
var filePath:String = "Your Local File Path";  
uploadService.uploadFile(fileName,filePath, UploadFileType.IMAGE , description,new callback());
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("file url:"+file.getUrl());
				trace(" tiny Url:"+file.getTinyUrl());
				trace("  Description:"+file.getDescription());
				trace("Created On"+file.getCreatedOn());
			}
		}		
	}
}
Coming Soon 

Get All Files

Get all the files for the App.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
uploadService.getAllFiles(new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription());
	}	
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
uploadService.GetAllFiles(new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		Upload upload = (Upload) response;     
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}  
	}
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}   
} 
Upload *upload = [uploadService getAllFiles]; 
NSLog(@"fileName is %@" , [(File *)[upload.fileListArray objectAtIndex:0] name]);
NSLog(@"fileType is %@" , [(File *)[upload.fileListArray objectAtIndex:0] type]);
NSLog(@"fileDescription is %@" , [(File *)[upload.fileListArray objectAtIndex:0] description]);
NSString *jsonResponse = [upload toString]; 
Upload upload = uploadService.getAllFiles(); 
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
Upload upload = uploadService.getAllFiles();   
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription());
}	
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GetAllFiles(new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;   
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
            App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
        	App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
        	App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var result ;  
uploadService.getAllFiles({  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response.upload.files.file;
		for (var i = 0 ; i<result.length;i++){
		console.log("name is " +result[i].name)
		console.log("file type is"+result[i].type)
		console.log(" url is" +result[i].url)
	}
	},  
	error: function(error) {  
	}  
}); 
local App42CallBack = {}
uploadService:getAllFiles(App42CallBack);  
function App42CallBack:onSuccess(object)  
	if table.getn(object:getFileList()) >1 then   
	for m=1,table.getn(object:getFileList()) do  
		print("fileName is :".. object:getFileList()[m]:getName()); 
		print("Type is :".. object:getFileList()[m]:getType());     
		print("Url is :".. object:getFileList()[m]:getUrl());  
		print("fileDescription is: ".. object:getFileList()[m]:getDescription());  
	end
	else     
		print("fileName is :".. object:getFileList():getName()); 
		print("Type is :".. object:getFileList():getType());     
		print("Url is :".. object:getFileList():getUrl());  
		print("fileDescription is: ".. object:getFileList():getDescription());  
	end
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
uploadService->GetAllFiles(this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}

Upload upload = uploadService.GetAllFiles();   
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
$upload = $uploadService->getAllFiles(); 
$fileList = $upload->getFileList();
foreach ($fileList as $files) 
{
	print_r("FileName is : " . $files->getName());
	print_r("Type is : " . $files->getType());
	print_r("Url is : " . $files->getUrl());
	print_r("TinyUrl is: " . $files->getTinyUrl());
	print_r("Description is: " . $files->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
upload = upload_service.get_all_files(); 
file_list = Array.new();
for file in file_list do
puts "fileName is #{file.name}";
puts "fileType is #{file.type}";
end
jsonResponse = upload.to_s(); 
uploadService.getAllFiles(new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("fileList url:"+file.getUrl())
				trace(" tiny Url:"+file.getTinyUrl())
				trace("  Description:"+file.getDescription())
			}
		}
		
	}
} 
Coming Soon 

Get All Files Count

Gets count of all the files for the App.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
uploadService.getAllFilesCount(new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("Total Records :  " + app42response.getTotalRecords()) ;
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
}); 
uploadService.GetAllFilesCount(new Callback());
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		App42Response upload = (App42Response) response;     
		String jsonResponse = upload.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	} 
}  
App42Response *response = [uploadService getAllFilesCount]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
App42Response response = uploadService.getAllFilesCount(); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
App42Response app42response = uploadService.getAllFilesCount(); 
System.out.println("Total Records :  " + app42response.getTotalRecords()) ;
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GetAllFilesCount(new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response = (App42Response) response;
        App42Log.Console("Response is : "app42Response.ToString()); 
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var result ;  
uploadService.getAllFilesCount({  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response;
		console.log("success is : " + result.success)
		console.log("totalRecords is : " + result.totalRecords)
	},  
	error: function(error) {  
	}  
}); 
local App42CallBack = {}
uploadService:getAllFilesCount(App42CallBack)
function App42CallBack:onSuccess(object)             
	print("Total Records is :"..object:getTotalRecords());
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
uploadService->GetAllFilesCount(this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        printf("\nTotalRecords=%d",uploadResponse->getTotalRecords());
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}

App42Response response = uploadService.GetAllFilesCount(); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$response = $uploadService->getAllFilesCount(); 
print_r("Total Records :".$response->getTotalRecords());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
response = upload_service.get_all_files_count(); 
success = response.isResponseSuccess();
total_records = response.totalRecords();
jsonResponse = response.to_s(); 
uploadService.getAllFilesCount(new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var app42Response:App42Response = App42Response(response);
		trace("Totalrecords is : " + app42Response.getTotalRecords());		
	}
}
Coming Soon 

Get All Files Paging

Get all the files by Paging for the App.

Required Parameters

max - Maximum number of records to be fetched. offset - From where the records are to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
int max = 10;
int offset = 0;  
uploadService.getAllFiles(max, offset, new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription());
	}
}
public void onException(Exception ex)
{
	System.out.println("Exception Message"+ex.getMessage());	
}
}); 
int max = 10;
int offset = 0;  
uploadService.GetAllFiles(max,offset,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Upload upload = (Upload) response;     
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}  
	}  
} 
int max = 10;
int offset = 0;  
Upload *upload = [uploadService getAllFiles:max offset:offset]; 
NSLog(@"fileName is %@" , [(File *)[upload.fileListArray objectAtIndex:0] name]);
NSLog(@"fileType is %@" , [(File *)[upload.fileListArray objectAtIndex:0] type]);
NSLog(@"fileDescription is %@" , [(File *)[upload.fileListArray objectAtIndex:0] description]);
NSString *jsonResponse = [upload toString]; 
Integer max = new Integer(10);
Integer offset = new Integer(0);  
Upload upload = uploadService.getAllFiles(max,offset);   
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
int max = 10;
int offset = 0;  
Upload upload = uploadService.getAllFiles(max,offset);   
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription());
}
int max = 10;
int offset = 0;  
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GetAllFiles(max, offset, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;  
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
            App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
            App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
            App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var max = 10,
offset = 0;  
var result ;  
uploadService.getAllFilesByPaging(max,offset,{  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response.upload.files.file;
		for (var i = 0 ; i<result.length;i++){
		console.log("name is " +result[i].name)
		console.log("file type is"+result[i].type)
		console.log(" url is" +result[i].url)
	}
	},  
	error: function(error) {  
	}  
}); 
local max = 10;
local offset = 0; 
local App42CallBack = {}
uploadService:getAllFilesByPaging(max,offset,App42CallBack);  
function App42CallBack:onSuccess(object)  
	if table.getn(object:getFileList()) >1 then   
	for m=1,table.getn(object:getFileList()) do  
		print("fileName is :".. object:getFileList()[m]:getName()); 
		print("Type is :".. object:getFileList()[m]:getType());     
		print("Url is :".. object:getFileList()[m]:getUrl());  
		print("fileDescription is: ".. object:getFileList()[m]:getDescription());  
	end
	else     
		print("fileName is :".. object:getFileList():getName()); 
		print("Type is :".. object:getFileList():getType());     
		print("Url is :".. object:getFileList():getUrl());  
		print("fileDescription is: ".. object:getFileList():getDescription());  
	end
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
int max = 2;
int offset = 0;
uploadService->GetAllFiles(max, offset,this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}
int max = 10;
int offset = 0;  
Upload upload = uploadService.GetAllFiles(max,offset);   
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
$max = 10;
$offset = 0;  	
$upload = $uploadService->getAllFiles($max,$offset); 
$fileList = $upload->getFileList();
foreach ($fileList as $files) 
{
	print_r("FileName is : " . $files->getName());
	print_r("Type is : " . $files->getType());
	print_r("Url is : " . $files->getUrl());
	print_r("TinyUrl is: " . $files->getTinyUrl());
	print_r("Description is: " . $files->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
max = 10;
offset = 0;	
upload = upload_service.get_all_files_by_paging(max, offset); 
file_list = Array.new();
for file in file_list do
	puts "fileName is #{file.name}";
	puts "fileType is #{file.type}";
end
jsonResponse = upload.to_s(); 
var max:int = 10;  
var offset:int = 0; 
uploadService.getAllFilesByPaging(max,offset,new callback());
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("fileList url:"+file.getUrl())
				trace(" tiny Url:"+file.getTinyUrl())
				trace("  Description:"+file.getDescription())
			}
		}		
	}
}
Coming Soon 

Get File By Name

Get the file based on the file name.

Required Parameters

fileName - The name of the file which has to be retrieved.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String fileName = "<Your_file_name>";
uploadService.getFileByName(fileName, new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription());
	}	
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String fileName = "<Your_file_name>"; 
uploadService.GetFileByName(fileName,new Callback());   
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Upload upload = (Upload) response;     
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}  
	}  
} 
NSString *fileName = @"<Your_file_name>";  
Upload *upload = [uploadService getFileByName:fileName]; 
NSLog(@"fileName is %@" , [(File *)[upload.fileListArray objectAtIndex:0] name]);
NSLog(@"fileType is %@" , [(File *)[upload.fileListArray objectAtIndex:0] type]);
NSLog(@"fileDescription is %@" , [(File *)[upload.fileListArray objectAtIndex:0] description]);
NSString *jsonResponse = [upload toString]; 
String fileName = "<Your_file_name>";
Upload upload = uploadService.getFileByName(fileName);   
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
String fileName = "<Your_file_name>";
Upload upload = uploadService.getFileByName(fileName);   
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription());
}	
String fileName = "<Your_file_name>";
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GetFileByName(fileName, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;  
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
            App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
            App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
            App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
    }

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var fileName = "<Your_file_name>";
var result ;  
uploadService.getFileByName(fileName,{  
	success: function(object)
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response.upload.files.file;
		console.log("name is " +result.name)
		console.log("file type is"+result.type)
		console.log(" url is" +result.url)
	},  
	error: function(error) {  
	}  
}); 
local fileName = "<Your_file_name>";
local App42CallBack = {}
uploadService:getFileByName(fileName,App42CallBack)
function App42CallBack:onSuccess(object)   
	print("fileName is :".. object:getFileList():getName()); 
	print("Type is :".. object:getFileList():getType());     
	print("Url is :".. object:getFileList():getUrl());  
	print("Description is: ".. object:getFileList():getDescription());         
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* fileName = "<Your_file_name>";
uploadService->GetFileByName(fileName,this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}

String fileName = "<Your_file_name>";
Upload upload = uploadService.GetFileByName(fileName);   
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
	
$fileName = "<Your_file_name>";
$upload = $uploadService->getFileByName($fileName); 
$fileList = $upload->getFileList();
foreach ($fileList as $files) 
{
	print_r("FileName is : " . $files->getName());
	print_r("Type is : " . $files->getType());
	print_r("Url is : " . $files->getUrl());
	print_r("TinyUrl is: " . $files->getTinyUrl());
	print_r("Description is: " . $files->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
fileName = "<Your_file_name>";
upload = uploadService.get_file_by_name(fileName); 
file_list = Array.new();
for file in file_list do
  puts "fileName is #{file.name}";
  puts "fileType is #{file.type}";
  puts "url is #{file.url}";
  puts "description is #{file.description}";
end
jsonResponse = upload.to_s();
var fileName:String  = "<Your_file_name>"; 
uploadService.getFileByName(fileName,new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("fileList url:"+file.getUrl())
				trace(" tiny Url:"+file.getTinyUrl())
				trace("  Description:"+file.getDescription())
			}
		}	
	}
} 
Coming Soon 

Get Files By Type

Get the files based on the file type.

Required Parameters

fileType - Type of the file e.g. UploadFileType.AUDIO, UploadFileType.XML etc.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
UploadFileType fileType = UploadFileType.IMAGE;
uploadService.getFilesByType(fileType, new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription());
	}				
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
String fileType = "<Your_file_type>";
uploadService.GetFilesByType(fileType,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		Upload upload = (Upload) response;     
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}  
	}  
} 
NSString *fileType = @"<Your_file_type>";  
Upload *upload = [uploadService getFilesByType:fileType]; 
NSLog(@"fileName is %@" , [(File *)[upload.fileListArray objectAtIndex:0] name]);
NSLog(@"fileType is %@" , [(File *)[upload.fileListArray objectAtIndex:0] type]);
NSLog(@"fileDescription is %@" , [(File *)[upload.fileListArray objectAtIndex:0] description]);
NSString *jsonResponse = [upload toString]; 
UploadFileType fileType = UploadFileType.IMAGE;
Upload upload = uploadService.getFilesByType(fileType);   
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
UploadFileType fileType = UploadFileType.IMAGE;
Upload upload = uploadService.getFilesByType(fileType);   
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription());
}
String fileType = "<Your_file_type>";
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GetFilesByType(fileType, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;  
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
            App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
            App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
            App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
    }
    public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var fileType = "<Your_file_type>";
var result ;  
uploadService.getFilesByType(fileType,{  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response.upload.files.file;
		if(result.length == undefined)
		{
			console.log(result.name)
		}
			else
			for(var i = 0;i<result.length;i++){
			console.log("fileName is" +result[i].name)
			console.log("Url is" +result[i].Url)
			console.log("type is"+result[i].type)
		}
	},  
	error: function(error) {  
	}  
}); 
local fileType = "<Your_file_type>";
local App42CallBack = {}
uploadService:getFilesByType(fileType,App42CallBack) 
function App42CallBack:onSuccess(object)  
	if table.getn(object:getFileList()) >1 then   
	for m=1,table.getn(object:getFileList()) do  
		print("fileName is :".. object:getFileList()[m]:getName()); 
		print("Type is :".. object:getFileList()[m]:getType());     
		print("Url is :".. object:getFileList()[m]:getUrl());  
		print("fileDescription is: ".. object:getFileList()[m]:getDescription());  
	end
	else     
		print("fileName is :".. object:getFileList():getName()); 
		print("Type is :".. object:getFileList():getType());     
		print("Url is :".. object:getFileList():getUrl());  
		print("fileDescription is: ".. object:getFileList():getDescription());  
	end
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
FileType fileType = IMAGE;
uploadService->GetFilesByType(fileType,this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}

String fileType = "<Your_file_type>";
Upload upload = uploadService.GetFilesByType(fileType);   
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
	
$fileType = "<Your_file_type>";
$upload = $uploadService->getFilesByType($fileType); 
$fileList = $upload->getFileList();
foreach ($fileList as $files) 
{
	print_r("FileName is : " . $files->getName());
	print_r("Type is : " . $files->getType());
	print_r("Url is : " . $files->getUrl());
	print_r("TinyUrl is: " . $files->getTinyUrl());
	print_r("Description is: " . $files->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
fileType = App42::Upload::UploadFileType.new();
upload_file_type = fileType.enum("IMAGE");
upload = upload_service.get_files_by_type(upload_file_type); 
fileList = Array.new();
for file in fileList do
	puts "fileName is #{file.name}";
	puts "fileType is #{file.type}";
	puts "url is #{file.url}";
	puts "description is #{file.description}";
end
jsonResponse = upload.to_s(); 
var fileType:String = "<Your_file_type>"; 
uploadService.getFilesByType(fileType,new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("fileList url:"+file.getUrl())
				trace(" tiny Url:"+file.getTinyUrl())
				trace("  Description:"+file.getDescription())
			}
		}
	}	
}
Coming Soon 

Get Files Count By Type

Get the count of files based on the file type.

Required Parameters

fileType - Type of the file e.g. UploadFileType.AUDIO, UploadFileType.XML etc.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
UploadFileType fileType = UploadFileType.IMAGE;
uploadService.getFilesCountByType(fileType, new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("Total Records :  " + app42response.getTotalRecords()) ;
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String fileType = "<Your_file_type>";
uploadService.GetFilesCountByType(fileType,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		App42Response upload = (App42Response) response;     
		String jsonResponse = upload.ToString();  
	}  
}  
NSString *fileType = @"<Your_file_type>";
App42Response *response = [uploadService getFilesCountByType:fileType]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
String fileType = "<Your_file_type>";
App42Response response = uploadService.getFilesCountByType(fileType); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
UploadFileType fileType = UploadFileType.IMAGE;
App42Response app42response = uploadService.getFilesCountByType(fileType); 
System.out.println("Total Records :  " + app42response.getTotalRecords()) ;
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String fileType = "<Your_file_type>";
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GetFilesCountByType(fileType, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response = (App42Response) response; 
        App42Log.Console("app42Response is : " + app42Response.ToString());
    }
    public void OnException(Exception e)
    {
		App42Log.Console("Exception : " + e);
	}
}
var fileType = "<Your_file_type>",
result ;  
uploadService.getFilesCountByType(fileType,{  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response;
		console.log("success is : " + result.success)
		console.log("totalRecords is : " + result.totalRecords)
	},  
	error: function(error) {  
	}  
}); 
local fileType = "<Your_file_type>";
local App42CallBack = {}
uploadService:getFilesCountByType(fileType,App42CallBack)
function App42CallBack:onSuccess(object)             
	print("Total Records is :"..object:getTotalRecords());
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
FileType fileType = IMAGE;
uploadService->GetFilesCountByType(fileType,this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));
void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        printf("\nTotalRecords=%d",uploadResponse->getTotalRecords());
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}
String fileType = "<Your_file_type>";
App42Response response = uploadService.GetFilesCountByType(fileType); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$fileType = "<Your_file_type>";
$response = $uploadService->getFilesCountByType($fileType); 
print_r("Response is : ".$response->getTotalRecords());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
fileType = App42::Upload::UploadFileType.new();
upload_file_type = fileType.enum("IMAGE");
response = upload_service.get_files_count_by_type(upload_file_type); 
success = response.isResponseSuccess();
totalRecords = response.totalRecords();
jsonResponse = response.to_s();
var fileType:String = "<Your_file_type>";  
uploadService.getFilesCountByType(fileType,new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var app42Response:App42Response = App42Response(response);
		trace("Totalrecords is : " + app42Response.getTotalRecords()); 
	}
}
Coming Soon 

Get Files By Type Paging

Get the files based on file type by Paging.

Required Parameters

fileType - Type of the file e.g. UploadFileType.AUDIO, UploadFileType.XML etc. max - Maximum number of records to be fetched. offset - From where the records are to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
UploadFileType fileType = UploadFileType.IMAGE;
int max = 10;
int offset = 0;  
uploadService.getFilesByType(fileType, max, offset, new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription());
	}	
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());		
}
});
String fileType = "<Your_file_type>";
int max = 10;
int offset = 0;  
uploadService.GetFilesByType(fileType,max,offset,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		Upload upload = (Upload) response;     
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}  
	}  
} 
NSString *fileType = @"<Your_file_type>";  
int max = 10;
int offset = 0;  
Upload *upload = [uploadService getFilesByType:fileType max:max offset:offset]; 
NSLog(@"fileName is %@" , [(File *)[upload.fileListArray objectAtIndex:0] name]);
NSLog(@"fileType is %@" , [(File *)[upload.fileListArray objectAtIndex:0] type]);
NSLog(@"fileDescription is %@" , [(File *)[upload.fileListArray objectAtIndex:0] description]);
NSString *jsonResponse = [upload toString]; 
UploadFileType fileType = UploadFileType.IMAGE;
Integer max = new Integer(1);
Integer offset = new Integer(0);  
Upload upload = uploadService.getFilesByType(fileType,max,offset);   
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
UploadFileType fileType = UploadFileType.IMAGE;
int max = 10;
int offset = 0;  
Upload upload = uploadService.getFilesByType(fileType,max,offset); 
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription());
}	
String fileType = "<Your_file_type>";
int max = 10;
int offset = 0;  
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GetFilesByType(fileType, max, offset, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;  
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
            App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
            App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
            App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
    }

    public void OnException(Exception e)
    {
    	App42Log.Console("Exception : " + e);
	}
}
var fileType = "<Your_file_type>",
max = 10,
offset = 0,  
result ;  
uploadService.getFilesByType(fileType,max,offset,{  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response.upload.files.file;
		if(result.length == undefined)
		{
			console.log(result.name)
		}
			else
			for(var i = 0;i<result.length;i++){
			console.log("fileName is" +result[i].name)
			console.log("Url is" +result[i].Url)
			console.log("type is"+result[i].type)
		}
	},  
	error: function(error) {  
	}  
}); 
local fileType = "<Your_file_type>";
local max = 10;
local offset = 0; 
local App42CallBack = {}
uploadService:getFilesByTypeByPaging(fileType,max,offset,App42CallBack) 
function App42CallBack:onSuccess(object)  
	if table.getn(object:getFileList()) >1 then   
	for m=1,table.getn(object:getFileList()) do  
		print("fileName is :".. object:getFileList()[m]:getName()); 
		print("Type is :".. object:getFileList()[m]:getType());     
		print("Url is :".. object:getFileList()[m]:getUrl());  
		print("fileDescription is: ".. object:getFileList()[m]:getDescription());  
	end
	else     
		print("fileName is :".. object:getFileList():getName()); 
		print("Type is :".. object:getFileList():getType());     
		print("Url is :".. object:getFileList():getUrl());  
		print("fileDescription is: ".. object:getFileList():getDescription());  
	end
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
int max = 2;
int offset = 0;
FileType fileType = IMAGE;
uploadService->GetFilesByType(fileType,max,offset,this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}

String fileType = "<Your_file_type>";
int max = 10;
int offset = 0;  
Upload upload = uploadService.GetFilesByType(fileType,max,offset);  
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
	
$fileType = "<Your_file_type>";
$max = 10;
$offset = 0;  
$upload = $uploadService->getFilesByType($fileType,$max,$offset); 
$fileList = $upload->getFileList();
foreach ($fileList as $files) 
{
	print_r("FileName is : " . $files->getName());
	print_r("Type is : " . $files->getType());
	print_r("Url is : " . $files->getUrl());
	print_r("TinyUrl is: " . $files->getTinyUrl());
	print_r("Description is: " . $files->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
fileType = App42::Upload::UploadFileType.new();
upload_file_type = fileType.enum("IMAGE");					
max = 10;
offset = 0;
upload = upload_service.get_files_by_type_by_paging(upload_file_type, max, offset); 
fileList = Array.new();
for file in fileList do
	puts "fileName is #{file.name}";
	puts "fileType is #{file.type}";
	puts "url is #{file.url}";
	puts "description is #{file.description}";
end
jsonResponse = upload.to_s(); 
var fileType:String = "<Your_file_type>"; 
var max:int = 10;  
var offset:int = 0;    
uploadService.getFilesByTypeByPaging(fileType, max, offset,new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("fileList url:"+file.getUrl())
				trace(" tiny Url:"+file.getTinyUrl())
				trace("Description:"+file.getDescription())
			}
		}
	}	
}
Coming Soon 

Remove File By Name

Remove the file based on the file name.

Required Parameters

fileName - The name of the file which has to be removed.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String fileName = "<Your_file_name>";  
uploadService.removeFileByName(fileName, new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("response is " + app42response) ;  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
}); 
String fileName = "<Your_file_name>";  
uploadService.RemoveFileByName(fileName,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		App42Response upload = (App42Response) response;     
		String jsonResponse = upload.ToString();  
	}  
}  
NSString *fileName = @"<Your_file_name>";  
App42Response *response = [uploadService removeFileByName:fileName]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
String fileName = "<Your_file_name>";  
App42Response response = uploadService.removeFileByName(fileName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
String fileName = "<Your_file_name>";  
App42Response app42response = uploadService.removeFileByName(fileName); 
System.out.println("response is " + app42response) ;  
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String fileName = "<Your_file_name>";
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.RemoveFileByName(fileName, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
    	App42Response app42Response = (App42Response) response; 
        App42Log.Console("app42Response is : " + app42Response.ToString());
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
var fileName = "<Your_file_name>",
result ;  
uploadService.removeFileByName(fileName,{  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response;
		console.log("success is : " + result.success)
	},  
	error: function(error) {  
	}  
}); 
local fileName = "<Your_file_name>";
local App42CallBack = {}
uploadService:removeFileByName(fileName,App42CallBack)
function App42CallBack:onSuccess(object)        
	print("Response is :"..object:getStrResponse());
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end    
const char* fileName = "<Your_file_name>";
uploadService->RemoveFileByName(fileName,this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}
String fileName = "<Your_file_name>";  
App42Response response = uploadService.RemoveFileByName(fileName); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$fileName = "<Your_file_name>";  
$response = $uploadService->removeFileByName($fileName); 
print_r("Response is :". $response->toString());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
fileName = "<Your_file_name>";
response = upload_service.remove_file_by_name(fileName); 
success = response.isResponseSuccess();
jsonResponse = response.to_s();
var fileName:String = "<Your_file_name>"; 
uploadService.removeFileByName(fileName,new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var app42response :App42Response= App42Response(response);      
		trace("response is " + app42response)   	
	}
}
Coming Soon 

Remove All Files

Removes all the files for the App.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
uploadService.removeAllFiles(new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("response is " + app42response) ;  
}
public void onException(Exception ex)
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
uploadService.RemoveAllFiles(new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		App42Response upload = (App42Response) response;     
		String jsonResponse = upload.ToString();  
	}  
}  
App42Response *response = [uploadService removeAllFiles]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
App42Response response = uploadService.removeAllFiles(); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
App42Response app42response = uploadService.removeAllFiles(); 
System.out.println("response is " + app42response) ;  
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.RemoveAllFiles(new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response = (App42Response) response; 
        App42Log.Console("app42Response is : " + app42Response.ToString());
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
var result ;  
uploadService.removeAllFiles({  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response;
		console.log("success is : " + result.success)
	},  
	error: function(error) {  
	}  
}); 
local App42CallBack = {}
uploadService:removeAllFiles(App42CallBack)
function App42CallBack:onSuccess(object)        
	print("Response is :"..object:getStrResponse());
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end 
uploadService->RemoveAllFiles(this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}
App42Response response = uploadService.RemoveAllFiles(); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$response = $uploadService->removeAllFiles(); 
print_r("Response is :". $response->toString());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
response = upload_service.remove_all_files(); 
success = response.isResponseSuccess();
jsonResponse = response.to_s(); 
uploadService.removeAllFiles(new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var app42response :App42Response= App42Response(response);      
		trace("response is " + app42response)   	
	}
}  
Coming Soon 

Upload File For User

Upload file in the cloud for a particular user.

Required Parameters

fileName - The name of the file which has to be saved. It is used to retrieve the file. userName - The name of the user for which file has to be saved. filePath - The local path for the file. fileType - The type of the file. File can be either Audio, Video, Image, Binary, Txt, xml, json, csv or other Use the static constants e.g. UploadFileType.AUDIO, UploadFileType.XML etc. description - Description of the file to be uploaded.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String fileName = "<Your_file_name>";
String userName = "Nick";
String description = "File Description";	
String filePath = "Your Local File Path";	
UploadFileType fileType = UploadFileType.IMAGE;   
uploadService.uploadFileForUser(fileName,userName, filePath, fileType, description, new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription());
	}	
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
Not Available
NSString *fileName = @"FileName.ext";
NSString *userName = @"Nick";
NSString *description = @"File Description";
NSString *filePath = @"Your Local File Path";
NSString *fileType = @"<Your_file_type>";   
Upload *upload = [uploadService uploadFileForUser:fileName userName:userName filePath:filePath uploadFileType:fileType fileDescription:description]; 
NSLog(@"fileName is %@" , [(File *)[upload.fileListArray objectAtIndex:0] name]);
NSLog(@"fileType is %@" , [(File *)[upload.fileListArray objectAtIndex:0] type]);
NSLog(@"fileDescription is %@" , [(File *)[upload.fileListArray objectAtIndex:0] description]);
NSString *jsonResponse = [upload toString]; 
Not Available
String fileName = "<Your_file_name>";
String userName = "Nick";
String description = "File Description";	
String filePath = "Your Local File Path";	
UploadFileType fileType = UploadFileType.IMAGE;
Upload upload = uploadService.uploadFileForUser(fileName, userName, filePath, fileType, description);   
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription());
}	
String fileName = "<Your_file_name>";
String userName = "Nick";
String description = "File Description";    
String filePath = "Your Local File Path";
String fileType = "<Your_file_type>"; 
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.UploadFileForUser(fileName, userName, filePath, fileType, description, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;  
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
            App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
            App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
            App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
	}
}
var fileName = "<Your_file_name>",
userName = "Nick",
description = "File Description",
filePath = "Your Local File Path",	
fileType = "<Your_file_type>", 
result ;  
uploadService.uploadFileForUser(fileName,userName,filePath,fileType,description,{  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		console.log("name is " +uploadObj.app42.response.upload.files.file.name)
		console.log("file type is"+uploadObj.app42.response.upload.files.file.type)
		console.log(" url is" +uploadObj.app42.response.upload.files.file.url)
	},  
	error: function(error) {  
	}  
}); 
local fileName = "<Your_file_name>";
local userName = "Nick";
local description = "File Description";    
local filePath = "Your Local File Path";
local fileType = "<Your_file_type>"; 
local App42CallBack = {}
uploadService:uploadFileForUser(fileName,userName,filePath ,fileType,description,App42CallBack) 
function App42CallBack:onSuccess(object)
	print("FileName is :".. object:getFileList():getName()); 
	print("UserName is :".. object:getFileList():getUserName()); 
	print("Type is :".. object:getFileList():getType());     
	print("Url is :".. object:getFileList():getUrl());  
	print("Description is: ".. object:getFileList():getDescription());   
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* fileName = "<Your_file_name>";
const char* userName = "Nick";
const char* filePath = "Your Local File Path";
FileType fileType = IMAGE;
const char* description = "File Description";
uploadService->UploadFileForUser(fileName,userName, filePath, fileType, description, this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
            printf("\n CreatedOn=%s",it->createdOn.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}

String fileName = "<Your_file_name>";
String userName = "Nick";
String description = "File Description";	
String filePath = "Your Local File Path";	
String fileType = "<Your_file_type>";
Upload upload = uploadService.UploadFileForUser(fileName,userName,filePath,fileType,description);
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
$fileName = "<Your_file_name>";	
$userName = "Nick";
$fileType = "IMAGE";	
$filePath = "Your Local File Path";	
$description = "File Description";
$upload = $uploadService->uploadFileForUser($fileName,$userName, $filePath, $fileType, $description); 
$fileList = $upload->getFileList();
foreach ($fileList as $files) 
{
	print_r("FileName is : " . $files->getName());
	print_r("UserName is : " . $files->getUserName());
	print_r("Type is : " . $files->getType());
	print_r("Url is : " . $files->getUrl());
	print_r("TinyUrl is: " . $files->getTinyUrl());
	print_r("Description is: " . $files->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
fileName = "<Your_file_name>";
userName = "Nick";
filePath = "Your Local File Path";
fileType = App42::Upload::UploadFileType.new();
upload_file_type = file_type.enum("IMAGE");			
description = "File Description";
upload = uploadService.upload_file_for_user(fileName,userName,filePath,upload_file_type,description); 
file_list = Array.new();
for file in file_list do
  puts "fileName is #{file.name}";
  puts "fileType is #{file.type}";
  puts "url is #{file.url}";
  puts "description is #{file.description}";
end
jsonResponse = upload.to_s();  
var fileName:String = "<Your_file_name>";  
var userName:String = "Nick";  
var description:String = "File Description";      
var filePath:String = "Your Local File Path"; 
var fileType:String = "<Your_file_type>"; 
uploadService.uploadFileForUser(fileName,userName, filePath,fileType,description,new callback());
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("file url:"+file.getUrl());
				trace(" tiny Url:"+file.getTinyUrl());
				trace("Description:"+file.getDescription());
				trace("Created On"+file.getCreatedOn());
			}
		}		
	}
}
Coming Soon 

Get File By User

Get the file based on the file name of a user.

Required Parameters

fileName - The name of the file which has to be retrieved. userName - The name of the user for which file has to be retrieved.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String fileName = "<Your_file_name>";
String userName = "Nick";
uploadService.getFileByUser(fileName, userName, new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription());
	}	
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());		
}
});
String fileName = "<Your_file_name>"; 
String userName = "Nick";
uploadService.GetFileByUser(fileName,userName,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		Upload upload = (Upload) response;  
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}   
	}  
} 
NSString *fileName = @"<Your_file_name>"; 
NSString *userName = @"Nick"; 
Upload *upload = [uploadService getFileByUser:fileName userName:userName]; 
NSLog(@"fileName is %@" , [(File *)[upload.fileListArray objectAtIndex:0] name]);
NSLog(@"fileType is %@" , [(File *)[upload.fileListArray objectAtIndex:0] type]);
NSLog(@"fileDescription is %@" , [(File *)[upload.fileListArray objectAtIndex:0] description]);
NSString *jsonResponse = [upload toString]; 
String fileName = "<Your_file_name>";
String userName = "Nick";
Upload upload = uploadService.getFileByUser(fileName,userName);   
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
String fileName = "<Your_file_name>";
String userName = "Nick";
Upload upload = uploadService.getFileByUser(fileName,userName); 
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription());
}
String fileName = "<Your_file_name>";
String userName = "Nick";
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GetFileByUser(fileName, userName, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;  
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
            App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
            App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
            App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
    }
    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
var fileName = "<Your_file_name>",
userName = "Nick";
var result ;  
uploadService.getFileByUser(fileName,userName,{  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		console.log("name is " +uploadObj.app42.response.upload.files.file.name)
		console.log("file type is"+uploadObj.app42.response.upload.files.file.type)
		console.log(" url is" +uploadObj.app42.response.upload.files.file.url)
	},  
	error: function(error) {  
	}  
}); 
local fileName = "<Your_file_name>";
local userName = "Nick";
local App42CallBack = {}
uploadService:getFileByUser(fileName, userName,App42CallBack)
function App42CallBack:onSuccess(object)   
	print("FileName is :".. object:getFileList():getName()); 
	print("UserName is :".. object:getFileList():getUserName()); 
	print("Type is :".. object:getFileList():getType());     
	print("Url is :".. object:getFileList():getUrl());  
	print("Description is: ".. object:getFileList():getDescription());         
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end   
const char* fileName = "<Your_file_name>";
const char* userName = "Nick";
uploadService->GetFileByUser(fileName, userName,this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}
String fileName = "<Your_file_name>";
String userName = "Nick";
Upload upload = uploadService.GetFileByUser(fileName,userName);  
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
	
$fileName = "<Your_file_name>";
$userName = "Nick";
$upload = $uploadService->getFileByUser($fileName,$userName); 
$fileList = $upload->getFileList();
foreach ($fileList as $files) 
{
	print_r("FileName is : " . $files->getName());
	print_r("UserName is : " . $files->getUserName());
	print_r("Type is : " . $files->getType());
	print_r("Url is : " . $files->getUrl());
	print_r("TinyUrl is: " . $files->getTinyUrl());
	print_r("Description is: " . $files->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
fileName = "<Your_file_name>";
userName = "Nick";
upload = upload_service.get_file_by_user(fileName,userName); 
file_list = Array.new();
for file in file_list do
	puts "fileName is #{file.name}";
	puts "fileType is #{file.type}";
	puts "url is #{file.url}";
	puts "description is #{file.description}";
end
jsonResponse = upload.to_s();
var fileName:String = "<Your_file_name>";  
var userName:String = "Nick"; 
uploadService.getFileByUser(fileName,userName,new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("fileList url:"+file.getUrl())
				trace(" tiny Url:"+file.getTinyUrl())
				trace("  Description:"+file.getDescription())
			}
		}		
	}
}
Coming Soon 

Get All Files By User

Get all the files based on user name.

Required Parameters

userName - The name of the user for which file has to be retrieved.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
uploadService.getAllFilesByUser(userName, new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription());
	}	
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());		
}
});
String userName = "Nick";
uploadService.GetAllFilesByUser(userName,new Callback());  
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{ 
		Upload upload = (Upload) response;     
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	} 
} 
NSString *userName = @"Nick"; 
Upload *upload = [uploadService getAllFilesByUser:userName]; 
NSLog(@"fileName is %@" , [(File *)[upload.fileListArray objectAtIndex:0] name]);
NSLog(@"fileType is %@" , [(File *)[upload.fileListArray objectAtIndex:0] type]);
NSLog(@"fileDescription is %@" , [(File *)[upload.fileListArray objectAtIndex:0] description]);
NSString *jsonResponse = [upload toString]; 
String userName = "Nick";
Upload upload = uploadService.getAllFilesByUser(userName); 
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
String userName = "Nick";
Upload upload = uploadService.getAllFilesByUser(userName);   
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription());
}	
String userName = "Nick";
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GetAllFilesByUser(userName, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;  
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
            App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
            App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
            App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
    }
    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
var userName = "Nick";
var result ;  
uploadService.getAllFilesByUser(userName,{  
	success: function(object)
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response.upload.files.file;
		if(result.length == undefined)
		{
			console.log(result.name)
		}
		else
			for(var i = 0;i<result.length;i++){
			console.log(result[i].name)
			console.log(result[i].Url)
			console.log(result[i].type)
		}
	},  
	error: function(error) {  
	}  
}); 
local userName = "Nick";
local App42CallBack = {}
 uploadService:getAllFilesByUser(userName,App42CallBack)
function App42CallBack:onSuccess(object)  
	if table.getn(object:getFileList()) >1 then   
	for m=1,table.getn(object:getFileList()) do  
		print("fileName is :".. object:getFileList()[m]:getName()); 
		print("Username is :".. object:getFileList()[m]:getUserName()); 
		print("Type is :".. object:getFileList()[m]:getType());     
		print("Url is :".. object:getFileList()[m]:getUrl());  
		print("Description is: ".. object:getFileList()[m]:getDescription());  
	end
	else     
		print("fileName is :".. object:getFileList():getName());
		print("Username is :".. object:getFileList():getUserName());  
		print("Type is :".. object:getFileList():getType());     
		print("Url is :".. object:getFileList():getUrl());  
		print("fileDescription is: ".. object:getFileList():getDescription());  
	end
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
uploadService->GetAllFilesByUser(userName, this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}

String userName = "Nick";
Upload upload = uploadService.GetAllFilesByUser(userName);   
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
	
$userName = "Nick";
$upload = $uploadService->getAllFilesByUser($userName); 
$fileList = $upload->getFileList();
foreach ($fileList as $files) 
{
	print_r("FileName is : " . $files->getName());
	print_r("UserName is : " . $files->getUserName());
	print_r("Type is : " . $files->getType());
	print_r("Url is : " . $files->getUrl());
	print_r("TinyUrl is: " . $files->getTinyUrl());
	print_r("Description is: " . $files->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
userName = "Nick";
upload = upload_service.get_all_files_by_user(userName); 
file_list = Array.new();
for file in file_list do
	puts "fileName is #{file.name}";
	puts "fileType is #{file.type}";
	puts "url is #{file.url}";
	puts "description is #{file.description}";
end
jsonResponse = upload.to_s(); 
var userName:String = "Nick"; 
uploadService.getAllFilesByUser(userName,new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("fileList url:"+file.getUrl())
				trace(" tiny Url:"+file.getTinyUrl())
				trace("  Description:"+file.getDescription())
			}
		}
	}
} 
Coming Soon 

Get All Files Count By User

Get the count of files based on user name.

Required Parameters

userName - The name of the user for which file has to be retrieved.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
uploadService.getAllFilesCountByUser(userName,new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("Total Records : " + app42response.getTotalRecords());  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());		
}
}); 
String userName = "Nick";
uploadService.GetAllFilesCountByUser(userName,new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{ 
		App42Response upload = (App42Response) response;     
		String jsonResponse = upload.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
NSString *userName = @"Nick";
App42Response *response = [uploadService getAllFilesCountByUser:userName]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
String userName = "Nick";
App42Response response = uploadService.getAllFilesCountByUser(userName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
String userName = "Nick";
App42Response app42response = uploadService.getAllFilesCountByUser(userName); 
System.out.println("Total Records : " + app42response.getTotalRecords()) ;  
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String userName = "Nick";
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GetAllFilesCountByUser(userName, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response = (App42Response) response; 
        App42Log.Console("app42Response is : " + app42Response.ToString());
    }
    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
var userName = "Nick",
result ;  
uploadService.getAllFilesCountByUser(userName,
{  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response;
		console.log("success is : " + result.success)
	},  
	error: function(error) {  
	}  
}); 
local userName = "Nick";
local App42CallBack = {}
uploadService:getAllFilesCountByUser(userName,App42CallBack)
function App42CallBack:onSuccess(object)   
	print("Total Records is :"..object:getTotalRecords());       
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end 
const char* userName = "Nick";
uploadService->GetAllFilesCountByUser(userName,this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        printf("\nTotalRecords=%d",uploadResponse->getTotalRecords());
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}
String userName = "Nick";
App42Response response = uploadService.GetAllFilesCountByUser(userName); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$userName = "Nick";
$response = $uploadService->getAllFilesCountByUser($userName); 
print_r("TotalRecords is ".$response->getTotalRecords());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
userName = "Nick";
response = upload_service.get_all_files_count_by_user(userName); 
success = response.isResponseSuccess();
total_records = response.totalRecords();
jsonResponse = response.to_s(); 
var userName:String = "Nick";  
uploadService.getAllFilesCountByUser(userName,new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var app42Response:App42Response = App42Response(response);
		trace("Totalrecords is : " + app42Response.getTotalRecords());	
	}
} 
Coming Soon 

Get All Files By User Paging

Get all the files based on user name by Paging.

Required Parameters

max - Maximum number of records to be fetched. offset - From where the records are to be fetched. userName - The name of the user for which file has to be retrieved.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
int max = 10;
int offset = 0;  
uploadService.getAllFilesByUser(userName,max,offset,new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription());
	}		
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});    
String userName = "Nick";
int max = 10;
int offset = 0;  
uploadService.GetAllFilesByUser(userName,max,offset,new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{ 
		Upload upload = (Upload) response;     
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
} 
NSString *userName = @"Nick";
int max = 10;
int offset = 0;  
Upload *upload = [uploadService getAllFilesByUser:userName max:max offset:offset]; 
NSLog(@"fileName is %@" , [(File *)[upload.fileListArray objectAtIndex:0] name]);
NSLog(@"fileType is %@" , [(File *)[upload.fileListArray objectAtIndex:0] type]);
NSLog(@"fileDescription is %@" , [(File *)[upload.fileListArray objectAtIndex:0] description]);
NSString *jsonResponse = [upload toString]; 
String userName = "Nick";
Integer max = new Integer(1);
Integer offset = new Integer(0);  
Upload upload = uploadService.getAllFilesByUser(userName,max,offset);   
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
String userName = "Nick";
int max = 10;
int offset = 0;  
Upload upload = uploadService.getAllFilesByUser(userName,max,offset);   
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription());
}	
String jsonResponse = upload.toString();    
String userName = "Nick";
int max = 10;
int offset = 0;  
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GetAllFilesByUser(userName, max, offset, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;  
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
            App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
            App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
            App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
var userName = "Nick",
max = 10,
offset = 0;  
var result ;  
uploadService.getAllFilesByUserWithPaging(userName,max,offset,{  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response.upload.files.file;
		if(result.length == undefined)
		{
			console.log(result.name)
		}
		else
			for(var i = 0;i<result.length;i++){
			console.log(result[i].name)
			console.log(result[i].Url)
			console.log(result[i].type)
		}
	},  
	error: function(error) {  
	}  
}); 
local userName = "Nick";
local max = 10;
local offset = 0; 
local App42CallBack = {}
 uploadService:getAllFilesByUserByPaging(userName,max, offset,App42CallBack)
function App42CallBack:onSuccess(object)  
	if table.getn(object:getFileList()) >1 then   
	for m=1,table.getn(object:getFileList()) do  
		print("fileName is :".. object:getFileList()[m]:getName()); 
		print("Username is :".. object:getFileList()[m]:getUserName()); 
		print("Type is :".. object:getFileList()[m]:getType());     
		print("Url is :".. object:getFileList()[m]:getUrl());  
		print("Description is: ".. object:getFileList()[m]:getDescription());  
	end
	else     
		print("fileName is :".. object:getFileList():getName());
		print("Username is :".. object:getFileList():getUserName());  
		print("Type is :".. object:getFileList():getType());     
		print("Url is :".. object:getFileList():getUrl());  
		print("fileDescription is: ".. object:getFileList():getDescription());  
	end
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
int max = 2;
int offset = 0;
uploadService->GetAllFilesByUser(userName, max,offset, this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}

String userName = "Nick";
int max = 10;
int offset = 0;  
Upload upload = uploadService.GetAllFilesByUser(userName,max,offset);   
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
$userName = "Nick";
$max = 10;
$offset = 0;  	
$upload = $uploadService->getAllFilesByUser($userName,$max,$offset); 
$fileList = $upload->getFileList();
foreach ($fileList as $files) 
{
	print_r("FileName is : " . $files->getName());
	print_r("UserName is : " . $files->getUserName());
	print_r("Type is : " . $files->getType());
	print_r("Url is : " . $files->getUrl());
	print_r("TinyUrl is: " . $files->getTinyUrl());
	print_r("Description is: " . $files->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
user_name = "Nick";
max = 10;
offset = 0;
upload = upload_service.get_all_files_by_user_by_paging(user_name, max, offset); 
file_list = Array.new();
for file in file_list do
	puts "fileName is #{file.name}";
	puts "fileType is #{file.type}";
	puts "url is #{file.url}";
	puts "description is #{file.description}";
end
jsonResponse = upload.to_s();
var userName:String = "Nick";  
var max:int = 10;  
var offset:int = 0;  
uploadService.getAllFilesByUserByPaging(userName,max,offset,new callback());
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("fileList url:"+file.getUrl())
				trace(" tiny Url:"+file.getTinyUrl())
				trace("  Description:"+file.getDescription())
			}
		}
	}
}
Coming Soon 

Remove File By User

Remove the file based on file name and user name.

Required Parameters

fileName - The name of the file which has to be removed. userName - The name of the user for which file has to be removed.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String fileName = "<Your_file_name>";  
uploadService.removeFileByUser(fileName, userName, new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("Response is : " + app42response) ;  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
}); 
String userName = "Nick";
String fileName = "<Your_file_name>";  
uploadService.RemoveFileByUser(fileName,userName,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		App42Response upload = (App42Response) response;     
		String jsonResponse = upload.ToString();  
	}  
}  
NSString *userName = @"Nick";
NSString *fileName = @"<Your_file_name>";  
App42Response *response = [uploadService removeFileByUser:fileName userName:userName]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
String userName = "Nick";
String fileName = "<Your_file_name>";  
App42Response response = uploadService.removeFileByUser(fileName,userName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
String userName = "Nick";
String fileName = "<Your_file_name>";  
App42Response app42response = uploadService.removeFileByUser(fileName,userName); 
System.out.println("Response is : " + app42response) ; 
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String fileName = "<Your_file_name>";  
String userName = "Nick";
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.RemoveFileByUser(fileName, userName, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response = (App42Response) response; 
        App42Log.Console("app42Response is : " + app42Response.ToString());
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
var userName = "Nick",
fileName = "<Your_file_name>",  
result ;  
uploadService.removeFileByUser(fileName,userName,
{  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response;
		console.log("success is : " + result.success)
	},  
	error: function(error) {  
	}  
}); 
local fileName = "<Your_file_name>";  
local userName = "Nick";
local App42CallBack = {}
uploadService:removeFileByUser( fileName, userName,App42CallBack) 
function App42CallBack:onSuccess(object)        
	print("Response is :"..object:getStrResponse());
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end    
const char* fileName = "<Your_file_name>";
const char* userName = "Nick";
uploadService->RemoveFileByUser(fileName,userName,this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}

String userName = "Nick";
String fileName = "<Your_file_name>";  
App42Response response = uploadService.RemoveFileByUser(fileName,userName); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$userName = "Nick";
$fileName = "<Your_file_name>";  
$response = $uploadService->removeFileByUser($fileName,userName); 
print_r("Response is : ".$response->toString());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
fileName = "File03";
userName = "Nick";
response = upload_service.remove_file_by_user(fileName, userName); 
success = response.isResponseSuccess();
jsonResponse = response.to_s();    
var userName:String = "Nick";  
var fileName:String = "<Your_file_name>";    
uploadService.removeFileByUser(fileName,userName,new callback());
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var app42response :App42Response= App42Response(response);      
		trace("response is " + app42response)   	
	}
}
Coming Soon 

Remove All Files By User

Removes all files based on user name.

Required Parameters

userName - The name of the user for which files have to be removed.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";  	
uploadService.removeAllFilesByUser(userName,new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("Response is : " + app42response) ;  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String userName = "Nick";  
uploadService.RemoveAllFilesByUser(userName,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		App42Response upload = (App42Response) response;     
		String jsonResponse = upload.ToString();  
	}  
}  
NSString *userName = @"Nick";  
App42Response *response = [uploadService removeAllFilesByUser:userName]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
String userName = "Nick";  
App42Response response = uploadService.removeAllFilesByUser(userName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
String userName = "Nick";  
App42Response app42response = uploadService.removeAllFilesByUser(userName); 
System.out.println("Response is : " + app42response) ; 
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String userName = "Nick";
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.RemoveAllFilesByUser(userName, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response = (App42Response) response; 
        App42Log.Console("app42Response is : " + app42Response.ToString());
    }
    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
var userName = "Nick",
result ;  
uploadService.removeAllFilesByUser(userName,
{  
	success: function(object) 
	{  
		var uploadObj = JSON.parse(object);  
		result = uploadObj.app42.response;
		console.log("success is : " + result.success)
	},  
	error: function(error) {  
	}  
}); 
local userName = "Nick";
local App42CallBack = {}
uploadService:removeAllFilesByUser(userName,App42CallBack) 
function App42CallBack:onSuccess(object)        
	print("Response is :"..object:getStrResponse());
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
const char* userName = "Nick";
uploadService->RemoveAllFilesByUser(userName,this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}
String userName = "Nick";  
App42Response response = uploadService.RemoveAllFilesByUser(userName); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$userName = "Nick";  
$response = $uploadService->removeAllFilesByUser($userName); 
print_r("Response is : ".$response->toString());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
userName = "Nick";
response = upload_service.remove_all_files_by_user(userName); 
success = response.isResponseSuccess();
jsonResponse = response.to_s(); 
var userName:String = "Nick"; 
uploadService.removeAllFilesByUser(userName,new callback());
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var app42response :App42Response= App42Response(response);      
		trace("response is " + app42response)   	
	}
}
Coming Soon 

Upload File For User With Input Stream

Upload file in the cloud for a particular user via Stream.

Required Parameters

fileName - The name of the file which has to be upload. It is used to retrieve the file. userName - The name of the user for which file has to be uploaded. inputStream - InputStream of the file to be uploaded. fileType - The type of the file. File can be either Audio, Video, Image, Binary, Txt, xml, json, csv or other Use the static constants e.g. UploadFileType.AUDIO, UploadFileType.XML etc. description - Description of the file to be uploaded.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String fileName = "FileName.ext";
String userName = "Nick";
String description = "File Description";	
UploadFileType fileType = UploadFileType.IMAGE;
InputStream inputStream = null; /* Get input stream from your source */
uploadService.uploadFileForUser(fileName, userName, inputStream, fileType, description, new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription());
	}	
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());		
}
});
String fileName = "FileName.ext";
String userName = "Nick";
String description = "File Description";	
String fileType = "<Your_file_type>"; 
Stream inputStream = null; /* Get input stream from your source */
uploadService.UploadFileForUser(fileName,userName,inputStream, fileType,description,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{
		Upload upload = (Upload) response;   
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}  
	}  
} 
NSString *userName = @"Nick";
NSString *fileName = @"<Enter_file_name>";
NSString *fileType = IMAGE;
NSString *description = @"<Enter_file_description>";

NSData *fileData = nil; /*Get file data from your source*/

Upload *upload = [uploadServiceObject uploadFileForUser:fileName userName:userName fileData:fileData uploadFileType:fileType fileDescription:description];

for (File *file in upload.fileListArray)
{
    NSLog(@"fileName is %@",file.name);
    NSLog(@"fileType is %@",file.type);
    NSLog(@"fileDescription is %@",file.description);
    NSLog(@"tinyUrl=%@",file.tinyUrl);
    NSLog(@"Url=%@",file.url);
    NSLog(@"Type=%@",file.type);
}

String fileName = "FileName.ext";
String userName = "Nick";
String description = "File Description";	
UploadFileType fileType = UploadFileType.IMAGE;
InputStream inputStream = null ; /* Get inputStream from your source. */   
Upload upload = uploadService.uploadFileForUser(fileName, userName,inputStream, fileType, description);   
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
String fileName = "FileName.ext";
String userName = "Nick";
String description = "File Description";
UploadFileType fileType = UploadFileType.IMAGE;
InputStream inputStream = null; /* Get input stream from your source */
Upload upload = uploadService.uploadFileForUser(fileName, userName,inputStream,fileType,description);   
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription());
}	
Coming Soon
Not Available
Coming Soon
const char* fileName = "FileName.ext";
const char* userName = "Nick";
FileType fileType = IMAGE;
const char* description = "File Description";
unsigned char* inputStream = nullptr; /* Get input stream from your source */
int inputStreamSize =  <input_stream_size>;
uploadService->UploadFileForUser(fileName,userName, inputStream,inputStreamSize, fileType, description, this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
            printf("\n CreatedOn=%s",it->createdOn.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}

String fileName = "FileName.ext";
String userName = "Nick";
String description = "File Description";	
String fileType = "<Your_file_type>"; 	
Stream inputStream = null; /* Get input stream from your source */
Upload upload = uploadService.UploadFileForUser(fileName, userName,inputStream,fileType,description); 
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
Not Available
Coming Soon
fileName = "FileName.ext";
userName = "Nick";
inputStream = File.open('localPath', 'r');
fileType = App42::Upload::UploadFileType.new();
upload_file_type = fileType.enum("IMAGE");			
description = "File Description";			
upload = upload_service.upload_file_for_user_by_stream(fileName, userName, inputStream, upload_file_type, description); 
file_list = Array.new();
for file in file_list do
	puts "fileName is #{file.name}";
	puts "fileType is #{file.type}";
	puts "url is #{file.url}";
	puts "description is #{file.description}";
end
jsonResponse = upload.to_s(); 
Coming Soon 
Coming Soon 

Upload File With Input Stream

Uploads file on the cloud via Stream.

Required Parameters

name - The name of the file which has to be saved. It is used to retrieve the file. inputStream - InputStream of the file to be uploaded. fileType - The type of the file. File can be either Audio, Video, Image, Binary, Txt, xml, json, csv or other Use the static constants e.g. UploadFileType.AUDIO, UploadFileType.XML etc. description - Description of the file to be uploaded.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String fileName = "FileName.ext";
String description = "File Description";	
UploadFileType fileType = UploadFileType.IMAGE;
InputStream inputStream = null; /* Get input stream from your source */
uploadService.uploadFile(fileName,inputStream,	fileType , description, new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription()); 
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
String fileName = "FileName.ext";
String description = "File Description";	
String fileType = "<Your_file_type>"; 
Stream inputStream = null; /* Get input stream from your source */
uploadService.UploadFile(fileName,userName,inputStream,fileType,description,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		Upload upload = (Upload) response;     
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}  
	}  
} 
NSString *fileName = @"<Enter_file_name>";
NSString *description = @"<Enter_file_description>";
NSString *fileType = IMAGE;
NSData *fileData = nil; /*Get file data from your source*/

Upload *upload = [uploadServiceObject uploadFile:fileName fileData:fileData uploadFileType:fileType fileDescription:description];

for (File *file in upload.fileListArray)
{
    NSLog(@"fileName is %@",file.name);
    NSLog(@"fileType is %@",file.type);
    NSLog(@"fileDescription is %@",file.description);
    NSLog(@"tinyUrl=%@",file.tinyUrl);
    NSLog(@"Url=%@",file.url);
    NSLog(@"Type=%@",file.type);
}

String name = "<Your_file_name>";
String description = "File Description";	
UploadFileType fileType = UploadFileType.IMAGE;
InputStream inputStream = null ; /* Get inputStream from your source. */  
Upload upload = uploadService.uploadFile(name,inputStream,fileType,description);   
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
String fileName = "FileName.ext";
String description = "File Description";	
UploadFileType fileType = UploadFileType.IMAGE;
InputStream inputStream = null; /* Get input stream from your source */
Upload upload = uploadService.uploadFile(fileName,inputStream,fileType,description);   
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription()); 
}
Coming Soon
Not Available
Coming Soon
const char* fileName = "FileName.ext";
FileType fileType = IMAGE;
const char* description = "File Description";
unsigned char* inputStream = nullptr; /* Get input stream from your source */
int inputStreamSize =  <input_stream_size>;
uploadService->UploadFile(fileName, inputStream,inputStreamSize, fileType, description, this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        for(std::vector<App42Upload>::iterator it = uploadResponse->uploadArray.begin(); it != uploadResponse->uploadArray.end(); ++it)
        {
            printf("\n Name=%s",it->name.c_str());
            printf("\n UserName=%s",it->userName.c_str());
            printf("\n Type=%s",it->type.c_str());
            printf("\n Description=%s",it->description.c_str());
            printf("\n Url=%s",it->url.c_str());
            printf("\n CreatedOn=%s",it->createdOn.c_str());
        }
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
    }
}
String fileName = "<Your_file_name>";
String description = "File Description";	
String fileType = "<Your_file_type>"; 
Stream inputStream = null; /* Get input stream from your source */
Upload upload = uploadService.UploadFile(fileName,inputStream,fileType,description); 
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
Not Available
Coming Soon
fileName = "FileName.ext";
inputStream = File.open('localPath', 'r');
fileType = App42::Upload::UploadFileType.new();
upload_file_type = fileType.enum("IMAGE");			
description = "File Description";
upload = uploadService.upload_file_by_stream(fileName, inputStream, upload_file_type, description); 
file_list = Array.new();
for file in file_list do
	puts "fileName is #{file.name}";
	puts "fileType is #{file.type}";
	puts "url is #{file.url}";
	puts "description is #{file.description}";
end
jsonResponse = upload.to_s(); 
Coming Soon 
Coming Soon 

Upload File For Group

Uploads file on the cloud for the group.

Required Parameters

name - The name of the file which has to be saved. It is used to retrieve the file. userName - Name of the user who is uploading the file. ownerName - Name of owner of the group. groupName - Name of the group in which file has to upload. filePath - The local path for the file. fileType - Type of the file e.g. UploadFileType.AUDIO, UploadFileType.XML etc. description - Description of the file to be uploaded.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String ownerName = "<Enter_owner_name>" ;
String userName = "Nick" ;
String groupName = "<Enter_group_name>" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
UploadFileType fileType = UploadFileType.IMAGE;
uploadService.uploadFileForGroup(fileName, userName, ownerName, groupName, filePath, fileType, description, new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription()); 
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String fileName = "name.ext";
String ownerName = "<Enter_owner_name>" ;
String userName = "Nick" ;
String groupName = "<Enter_group_name>" ;
String description = "<Enter_file_description>";
String fileType = "<Your_file_type>"; 
Stream inputStream = null; /* Get input stream from your source */
uploadService.UploadFileForGroup(fileName, userName, ownerName, groupName, inputStream, fileType, description,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		Upload upload = (Upload) response;     
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}  
	}  
} 
NSString *userName = @"Nick";
NSString *ownerName = @"<Enter_owner_name>";
NSString *groupName = @"<Enter_group_name>";
NSString *fileName = @"<Enter_file_name>";
NSString *filePath = @"<Enter_file_path>";
NSString *description = @"<Enter_file_description>";

Upload *upload = [uploadService uploadFileForGroup:fileName userName:userName ownerName:ownerName groupName:groupName filePath:filePath fileType:IMAGE description:description];

for (File *file in upload.fileListArray)
{
    NSLog(@"fileName is %@",file.name);
    NSLog(@"fileType is %@",file.type);
    NSLog(@"fileDescription is %@",file.description);
    NSLog(@"tinyUrl=%@",file.tinyUrl);
    NSLog(@"Url=%@",file.url);
    NSLog(@"Type=%@",file.type);
}
String ownerName = "<Enter_owner_name>" ;
String userName = "Nick" ;
String groupName = "<Enter_group_name>" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
UploadFileType fileType = UploadFileType.IMAGE;
Upload upload = uploadService.uploadFileForGroup(fileName, userName, ownerName, groupName, filePath, fileType, description);
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
String ownerName = "<Enter_owner_name>" ;
String userName = "Nick" ;
String groupName = "<Enter_group_name>" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
UploadFileType fileType = UploadFileType.IMAGE;
Upload upload = uploadService.uploadFileForGroup(fileName, userName, ownerName, groupName, filePath, fileType, description);
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription()); 
}
String ownerName = "<Enter_owner_name>" ;
String userName = "Nick" ;
String groupName = "<Enter_group_name>" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
String fileType = "<Your_file_type>"; 
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.UploadFileForGroup(fileName, userName, ownerName, groupName, filePath, fileType, description, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;  
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
            App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
            App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
            App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
var userName = "Nick",
fileName = "<Enter_file_name>",
ownerName = "<Enter_owner_name>",
groupName = "<Enter_group_name>",
userName = "Nick",
description = "<Enter_file_description>",
filePath = "<Enter_file_path>",
fileType = "<Your_file_type>",
var result ;  
uploadService.uploadFileForGroup(fileName, userName, ownerName, groupName, filePath, fileType, description,{  
	success: function(object) 
	{    
		var uploadObj = JSON.parse(object);  
		console.log("name is " +uploadObj.app42.response.upload.files.file.name)
		console.log("file type is"+uploadObj.app42.response.upload.files.file.type)
		console.log(" url is" +uploadObj.app42.response.upload.files.file.url)
	},  
	error: function(error) {  
	}  
}); 
Not Available
Coming Soon
String ownerName = "<Enter_owner_name>" ;
String userName = "Nick" ;
String groupName = "<Enter_group_name>" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
String fileType = "<Your_file_type>"; 
Upload upload = uploadService.UploadFileForGroup(fileName, userName, ownerName, groupName, filePath, fileType, description);
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
$ownerName = "<Enter_owner_name>" ;
$userName = "Nick" ;
$groupName = "<Enter_group_name>" ;
$description = "<Enter_file_description>";
$fileName = "<Enter_file_name>" ;
$filePath = "<Enter_file_path>";
$fileType = "<Your_file_type>"; 
$upload = $uploadService->uploadFileForGroup($fileName, $userName,$ownerName, $groupName, $filePath,$fileType, $description);
$filelist= $upload->getFileList();
foreach($filelist as $file)
{
	print_r("FileName : ".$file->getName());
	print_r("UserName is  : ".$file->getUserName() );
	print_r("Type : ".$file->getType() );
	print_r("GetUrl : ".$file->getUrl() );
	print_r("TinyUrl : ".$file->getTinyUrl() );
	print_r("Description : ".$file->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
Coming Soon
var ownerName:String = "<Enter_owner_name>" ;  
var userName:String = "Nick" ;  
var groupName:String = "<Enter_group_name>" ;  
var description:String = "<Enter_file_description>";  
var fileName:String = "<Enter_file_name>" ;  
var filePath:String = "<Enter_file_path>";  
var fileType:String = "<Your_file_type>"; 
uploadService.uploadFileForGroup(fileName, userName, ownerName, groupName, filePath,fileType, description,new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("file url:"+file.getUrl());
				trace(" tiny Url:"+file.getTinyUrl());
				trace("Description:"+file.getDescription());
				trace("Created On"+file.getCreatedOn());
			}
		}		
	}
}
Coming Soon

Upload File For Friend

Upload file on the cloud for a friend.

Required Parameters

fileName - The name of the file which has to be saved. It is used to retrieve the file. userName - Name of the user who is uploading the file. buddyName - Name of the buddy for which file has to upload. filePath - The local path for the file. fileType - Type of the file e.g. UploadFileType.AUDIO, UploadFileType.XML etc. description - Description of the file to be uploaded.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick" ;
String buddyName = "buddyName" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
UploadFileType fileType = UploadFileType.IMAGE;
uploadService.uploadFileForFriend(fileName, buddyName,userName, filePath, fileType,description,new App42CallBack(){
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription()); 
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String fileName = "name.ext";
String userName = "Nick" ;
String buddyName = "buddyName" ;
String description = "<Enter_file_description>";
Stream inputStream = null; /* Get input stream from your source */
String fileType = "<Your_file_type>";
uploadService.UploadFileForFriend(fileName, userName, buddyName, inputStream, fileType, description,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		Upload upload = (Upload) response;    
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}  
	}  
} 
NSString *userName = @"Nick";
NSString *buddyName = @"<Enter_buddy_name>";
NSString *fileName = @"<Enter_file_name>";
NSString *filePath = @"<Enter_file_path>";
NSString *description = @"<Enter_file_description>";

Upload *upload = [uploadService uploadFileForFriend:fileName userName:userName buddyName:buddyName filePath:filePath fileType:OTHER description:description];

for (File *file in upload.fileListArray)
{
    NSLog(@"fileName is %@",file.name);
    NSLog(@"fileType is %@",file.type);
    NSLog(@"fileDescription is %@",file.description);
    NSLog(@"tinyUrl=%@",file.tinyUrl);
    NSLog(@"Url=%@",file.url);
    NSLog(@"Type=%@",file.type);
}
String userName = "Nick" ;
String buddyName = "buddyName" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
UploadFileType fileType = UploadFileType.IMAGE;
Upload upload = uploadService.uploadFileForFriend(fileName, userName, buddyName, filePath, fileType, description);
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
String userName = "Nick" ;
String buddyName = "buddyName" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
UploadFileType fileType = UploadFileType.IMAGE;
Upload upload = uploadService.uploadFileForFriend(fileName, userName, buddyName, filePath, fileType, description);
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription()); 
}
String userName = "Nick" ;
String buddyName = "buddyName" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
String fileType = "<Your_file_type>";
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.UploadFileForFriend(fileName, userName, buddyName, filePath, fileType, description, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;  
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
            App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
            App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
            App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
var userName = "Nick",
fileName = "<Enter_file_name>",
userName = "Nick",
buddyName = "<Enter_buddy_name>",
description = "<Enter_file_description>",
filePath = "<Enter_file_path>",
fileType = "IMAGE",
var result ;  
uploadService.uploadFileForFriend(fileName,userName,buddyName,filePath, fileType,description,{  
	success: function(object) 
	{    
		var uploadObj = JSON.parse(object);  
		console.log("name is " +uploadObj.app42.response.upload.files.file.name)
		console.log("file type is"+uploadObj.app42.response.upload.files.file.type)
		console.log(" url is" +uploadObj.app42.response.upload.files.file.url)
	},  
	error: function(error) {  
	}  
}); 
Not Available
Coming Soon
String userName = "Nick" ;
String buddyName = "buddyName" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
String fileType = "<Your_file_type>";
Upload upload = uploadService.UploadFileForFriend(fileName, userName, buddyName, filePath, fileType, description);
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
$userName = "Nick" ;
$buddyName = "buddyName" ;
$description = "<Enter_file_description>";
$fileName = "<Enter_file_name>" ;
$filePath = "<Enter_file_path>";
$fileType = "<Your_file_type>";
$upload = $uploadService->uploadFileForFriend($fileName, $userName,$buddyName, $filePath, $fileType,$description);
$filelist= $upload->getFileList();
foreach($filelist as $file)
{
	print_r("FileName : ".$file->getName());
	print_r("UserName is  : ".$file->getUserName() );
	print_r("Type : ".$file->getType() );
	print_r("GetUrl : ".$file->getUrl() );
	print_r("TinyUrl : ".$file->getTinyUrl() );
	print_r("Description : ".$file->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
Coming Soon
var userName:String = "Nick" ;  
var buddyName:String = "buddyName" ;  
var description:String = "<Enter_file_description>";  
var fileName:String = "<Enter_file_name>" ;  
var filePath:String = "<Enter_file_path>";  
uploadService.uploadFileForFriend(fileName, userName, buddyName, filePath, UploadFileType.IMAGE, description,new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("file url:"+file.getUrl());
				trace(" tiny Url:"+file.getTinyUrl());
				trace("Description:"+file.getDescription());
				trace("Created On"+file.getCreatedOn());
			}
		}		
	}
}	
Coming Soon

Upload File For Friends

Upload file on the cloud for friends.

Required Parameters

fileName - The name of the file which has to be saved. It is used to retrieve the file. userName - Name of the user who is uploading the file. filePath - The local path for the file. fileType - Type of the file e.g. UploadFileType.AUDIO, UploadFileType.XML etc. description - Description of the file to be uploaded.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
UploadFileType fileType = UploadFileType.IMAGE;
uploadService.uploadFileForFriends(fileName, userName, filePath, fileType, description,new App42CallBack(){
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription()); 
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String fileName = "name.ext";
String userName = "Nick" ;
String description = "<Enter_file_description>";
Stream inputStream = null; /* Get input stream from your source */
String fileType = "<Your_file_type>";
uploadService.UploadFileForFriends(fileName, userName, inputStream, fileType, description,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		Upload upload = (Upload) response;     
		IList<Upload.File>  fileList = upload.GetFileList();
		for(int i = 0; i < fileList.Count();i++ )
		{
			Console.WriteLine("fileName is " + fileList[i].GetName());
			Console.WriteLine("fileType is " + fileList[i].GetType());
			Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
			Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
		}  
	}  
} 
NSString *userName = @"Nick";
NSString *fileName = @"<Enter_file_name>";
NSString *filePath = @"<Enter_file_path>";
NSString *description = @"<Enter_file_description>";

Upload *upload = [uploadService uploadFileForFriends:fileName userName:userName filePath:filePath fileType:OTHER description:description];

for (File *file in upload.fileListArray)
{
    NSLog(@"fileName is %@",file.name);
    NSLog(@"fileType is %@",file.type);
    NSLog(@"fileDescription is %@",file.description);
    NSLog(@"tinyUrl=%@",file.tinyUrl);
    NSLog(@"Url=%@",file.url);
    NSLog(@"Type=%@",file.type);
}
String userName = "Nick" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
UploadFileType fileType = UploadFileType.IMAGE;
Upload upload = uploadService.uploadFileForFriends(fileName, userName, filePath, fileType, description);
Vector fileList = upload.getFileList();   
for(int i=0;i < fileList.size();i++)  
{ 
	Upload.File file = (Upload.File)fileList.elementAt(i);  
	System.out.println("fileName is " + file.getName());
	System.out.println("fileType is " + file.getType());
	System.out.println("fileUrl is " + file.getUrl());
	System.out.println("fileDescription is " + file.getDescription());
}
String userName = "Nick" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
UploadFileType fileType = UploadFileType.IMAGE;
Upload upload = uploadService.uploadFileForFriends(fileName, userName, filePath, fileType, description);
ArrayList<Upload.File>  fileList = upload.getFileList();   
for(int i = 0; i < fileList.size();i++ )  
{  
	System.out.println("fileName is :" + fileList.get(i).getName());  
	System.out.println("fileType is :" + fileList.get(i).getType());  
	System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
	System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
	System.out.println("fileDescription is: " + fileList.get(i).getDescription()); 
}
String userName = "Nick" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
String fileType = "<Your_file_type>";
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.UploadFileForFriends(fileName, userName, filePath, fileType, description, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Upload upload = (Upload) response;  
        IList<Upload.File>  fileList = upload.GetFileList();
        for(int i=0; i < fileList.Count; i++)
        {
            App42Log.Console("fileName is " + fileList[i].GetName());
            App42Log.Console("fileType is " + fileList[i].GetType());
            App42Log.Console("fileUrl is " + fileList[i].GetUrl());
            App42Log.Console("TinyUrl Is  : " + fileList[i].GetTinyUrl());
            App42Log.Console("fileDescription is " + fileList[i].GetDescription());
        }
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
var userName = "Nick",
fileName = "<Enter_file_name>",
description = "<Enter_file_description>",
filePath = "<Enter_file_path>",
fileType = "<Your_file_type>",
var result ;  
uploadService.uploadFileForFriends(fileName, userName, filePath, fileType, description,{  
	success: function(object) 
	{    
		var uploadObj = JSON.parse(object);  
		console.log("name is " +uploadObj.app42.response.upload.files.file.name)
		console.log("file type is"+uploadObj.app42.response.upload.files.file.type)
		console.log(" url is" +uploadObj.app42.response.upload.files.file.url)
	},  
	error: function(error) {  
	}  
}); 
Not Available
Coming Soon
String userName = "Nick" ;
String description = "<Enter_file_description>";
String fileName = "<Enter_file_name>" ;
String filePath = "<Enter_file_path>";
String fileType = "<Your_file_type>";
Upload upload = uploadService.UploadFileForFriends(fileName, userName, filePath, fileType, description);
IList<Upload.File>  fileList = upload.GetFileList();
for(int i = 0; i < fileList.Count();i++ )
{
	Console.WriteLine("fileName is " + fileList[i].GetName());
	Console.WriteLine("fileType is " + fileList[i].GetType());
	Console.WriteLine("fileUrl is " + fileList[i].GetUrl());
	Console.WriteLine("fileDescription is " + fileList[i].GetDescription());
}  
$userName = "Nick" ;
$description = "<Enter_file_description>";
$fileName = "<Enter_file_name>" ;
$filePath = "<Enter_file_path>";
$fileType = "<Your_file_type>";
$upload = $uploadService->uploadFileForFriends($fileName, $userName,$filePath, $fileType,$description);
$filelist= $upload->getFileList();
foreach($filelist as $file)
{
	print_r("FileName : ".$file->getName());
	print_r("UserName is  : ".$file->getUserName() );
	print_r("Type : ".$file->getType() );
	print_r("GetUrl : ".$file->getUrl() );
	print_r("TinyUrl : ".$file->getTinyUrl() );
	print_r("Description : ".$file->getDescription());
}
$jsonResponse = $upload->toString(); 
Coming Soon
Coming Soon
var userName:String = "Nick" ;  
var description:String = "<Enter_file_description>";  
var fileName:String = "<Enter_file_name>" ;  
var filePath:String = "<Enter_file_path>";  
var fileType:String = "<Your_file_type>"; 
uploadService.uploadFileForFriends(fileName, userName, filePath,fileType, description,new callback());	
class callback implements App42CallBack  
{  
	public function onException(exception:App42Exception):void  
	{  
		trace("Exception Message " + exception);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		if(upload.getFileList()!= null)
		{
			var fileList:Array  = upload.getFileList();				
			for(var k:int=0;k<fileList.length;k++)
			{
				var file:File=File(fileList[k]);
				trace("File  Name:"+file.getName());
				trace("File Type:"+file.getType());
				trace("file url:"+file.getUrl());
				trace(" tiny Url:"+file.getTinyUrl());
				trace("Description:"+file.getDescription());
				trace("Created On"+file.getCreatedOn());
			}
		}		
	}
} 
Coming Soon

Revoke Access

This function allows you to revoke permission specified in the ACL list for a user on a given file by the mentioned user. The permission can only be revoked by the userName who owns the file.

Required Parameters

fileName - Name of the file from which access has to be revoked. userName - Name of the user who want to revoke the access. aclList - The object contains the username and the permission to be granted/ revoked.The default user name in aclList is set to PUBLIC. In this case, permission is granted/ revoked from all the users accessing the service.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String fileName = "<Your_file_name>";
HashSet<ACL> aclList = new HashSet<ACL>();
aclList.add(new ACL("PUBLIC", Permission.READ)); 
uploadService.revokeAccess(fileName, userName, aclList,new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("Response is : " + app42response) ;  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String userName = "Nick";
String fileName = "<Your_file_name>";
IList<ACL> aclList = new List<ACL>();
aclList.Add(new ACL("PUBLIC", Permission.READ)); 
uploadService.RevokeAccess(fileName, userName, aclList,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		App42Response success = (App42Response) response;     
		String jsonResponse = success.ToString();  
	}  
} 
NSString *userName = @"Nick";
NSString *fileName = @"<Your_file_name>";
ACL *acl = [[ACL alloc] initWithUserName:@"PUBLIC" andPermission:APP42_READ];
NSArray *aclList = [NSArray arrayWithObject:acl];
App42Response *response = [uploadService revokeAccessOnFile:fileName ofUser:userName withAclList:aclList];
NSLog(@"isResponseSuccess=%d",response.isResponseSuccess);
NSLog(@"jsonResponse=%@",response.strResponse);
String userName = "Nick";
String fileName = "<Your_file_name>";
Hashtable aclList = new Hashtable();
aclList.put(new ACL("PUBLIC", ACL.PERMISSION_READ)); 
App42Response success =	uploadService.revokeAccess(fileName, userName, aclList);
String jsonResponse = success.toString(); 
String userName = "Nick";
String fileName = "<Your_file_name>";
HashSet<ACL> aclList = new HashSet<ACL>();
aclList.add(new ACL("PUBLIC", Permission.READ)); 
App42Response app42response =	uploadService.revokeAccess(fileName, userName, aclList);
System.out.println("Response is : " + app42response) ;
String jsonResponse = app42response.toString(); 
String userName = "Nick";
String fileName = "<Your_file_name>";
HashSet<ACL> aclList = new HashSet<ACL>();
aclList.Add(new ACL("PUBLIC", Permission.READ)); 
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.RevokeAccess(fileName, userName, aclList, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response = (App42Response) response; 
        App42Log.Console("app42Response is : " + app42Response.ToString());
    }
    
     public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
Coming Soon
String userName = "Nick";
String fileName = "<Your_file_name>";
local aclList = {}    
local acl  = ACL:new()    
acl:setUser("PUBLIC")
acl:setPermission(Permission.READ)
aclList[1] = acl
uploadService:revokeAccess(fileName, userName,aclList,App42CallBack)        
function App42CallBack:onSuccess(object)        
	print("Response is :"..object:getStrResponse());
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
Coming Soon
String userName = "Nick";
String fileName = "<Your_file_name>";
HashSet<ACL> aclList = new HashSet<ACL>();
aclList.Add(new ACL("PUBLIC", Permission.READ)); 
App42Response success =	uploadService.RevokeAccess(fileName, userName, aclList);
String jsonResponse = success.ToString();
Coming Soon
Coming Soon
Coming Soon
Coming Soon 
Coming Soon

Grant Access

This function allows you to grant permission specified in the ACL list to a user on a given file by the mentioned user. The permission can only be granted with the userName who owns the file.

Required Parameters

fileName - Name of the file for which access has to be grant. userName - Name of the user who want to grant the access. aclList - The object contains the username and the permission to be granted/ revoked.The default user name in aclList is set to PUBLIC. In this case, permission is granted/ revoked from all the users accessing the service.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String fileName = "<Your_file_name>";
HashSet<ACL> aclList = new HashSet<ACL>();
aclList.add(new ACL("PUBLIC", Permission.READ)); 
uploadService.grantAccess(fileName, userName, aclList, new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("Response is : " + app42response) ;  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String userName = "Nick";
String fileName = "<Your_file_name>";
IList<ACL> aclList = new List<ACL>();
aclList.Add(new ACL("PUBLIC", Permission.READ)); 
uploadService.GrantAccess(fileName, userName, aclList,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{ 
		App42Response success = (App42Response) response;     
		String jsonResponse = success.ToString();  
	}  
} 
NSString *userName = @"Nick";
NSString *fileName = @"<Your_file_name>";
ACL *acl = [[ACL alloc] initWithUserName:@"PUBLIC" andPermission:APP42_READ];
NSArray *aclList = [NSArray arrayWithObject:acl];
App42Response *response = [uploadService grantAccessOnFile:fileName ofUser:userName withAclList:aclList];
NSLog(@"isResponseSuccess=%d",response.isResponseSuccess);
NSLog(@"jsonResponse=%@",response.strResponse);
String userName = "Nick";
String fileName = "<Your_file_name>";
Hashtable aclList = new Hashtable();
aclList.put(new ACL("PUBLIC", ACL.PERMISSION_READ)); 
App42Response success =	uploadService.grantAccess(fileName, userName, aclList);
String jsonResponse = success.toString(); 
String userName = "Nick";
String fileName = "<Your_file_name>";
HashSet<ACL> aclList = new HashSet<ACL>();
aclList.add(new ACL("PUBLIC", Permission.READ)); 
App42Response app42response =	uploadService.grantAccess(fileName, userName, aclList);
System.out.println("Response is : " + app42response) ;  
String jsonResponse = app42response.toString(); 
String userName = "Nick";
String fileName = "<Your_file_name>";
HashSet<ACL> aclList = new HashSet<ACL>();
aclList.Add(new ACL("PUBLIC", Permission.READ)); 
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GrantAccess(fileName, userName, aclList, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response = (App42Response) response; 
        App42Log.Console("app42Response is : " + app42Response.ToString());
    }
    
     public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
Coming Soon
String userName = "Nick";
String fileName = "<Your_file_name>";
local aclList = {}    
local acl  = ACL:new()    
acl:setUser("PUBLIC")
acl:setPermission(Permission.READ)
aclList[1] = acl
uploadService:grantAccess(fileName, userName,aclList,App42CallBack)        
function App42CallBack:onSuccess(object)        
	print("Response is :"..object:getStrResponse());
end  
function App42CallBack:onException(exception)
	print("Message is : "..exception:getMessage())
	print("App Error code is : "..exception:getAppErrorCode())
	print("Http Error code is "..exception:getHttpErrorCode())
	print("Detail is : "..exception:getDetails())
end
Coming Soon
String userName = "Nick";
String fileName = "<Your_file_name>";
HashSet<ACL> aclList = new HashSet<ACL>();
aclList.Add(new ACL("PUBLIC", Permission.READ)); 
App42Response success =	uploadService.GrantAccess(fileName, userName, aclList);
String jsonResponse = success.ToString();
Coming Soon
Coming Soon
Coming Soon
Coming Soon 
Coming Soon

Exception Handling

The functions available under File Upload API can throw some exceptions in abnormal conditions.An example of the same has been given below. E.g. If an App developer is requesting for the files by type which is not in a database, the function will throw the App42Exception (as shown below) with the message as “Not Found” and the appErrorCode as “2102” and the details as “Files for the user ‘Nick’ do not exist”.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
uploadService.getAllFilesByUser(userName, new App42CallBack() {
public void onSuccess(Object response) 
{
	Upload upload = (Upload)response;						
	ArrayList<Upload.File>  fileList = upload.getFileList();   
	for(int i = 0; i < fileList.size();i++ )  
	{  
		System.out.println("fileName is :" + fileList.get(i).getName());  
		System.out.println("fileType is :" + fileList.get(i).getType());  
		System.out.println("fileUrl is :" + fileList.get(i).getUrl());  
		System.out.println("Tiny Url is :"+fileList.get(i).getTinyUrl());
		System.out.println("fileDescription is: " + fileList.get(i).getDescription());
	}
}
public void onException(Exception ex) 
{
	App42Exception exception = (App42Exception)ex;
	int appErrorCode = exception.getAppErrorCode();
	int httpErrorCode = exception.getHttpErrorCode();
	if(appErrorCode == 2102)
	{
	// Handle here for Not found (Files for the User 'Nick' does not Exist )
	}  
	else if(appErrorCode == 1401){
	// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
	// handle here for Internal Server Error
	}
	String jsonText = ex.getMessage(); 	
	}  	   
});                                           
String userName = "Nick";
uploadService.GetAllFilesByUser(userName, new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
		int appErrorCode = exception.GetAppErrorCode();
		int httpErrorCode = exception.GetHttpErrorCode();
		if(appErrorCode == 2102)
		{
			// Handle here for Not found (Files for the User 'Nick' does not Exist )
		}  
		else if(appErrorCode == 1401){
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500){
			// handle here for Internal Server Error
		}
		String jsonText = exception.GetMessage(); 
	}  
	public void OnSuccess(Object response)  
	{ 
		Upload upload = (Upload) response;
		String jsonResponse = upload.ToString();  
	}  
}  
					
NSString *userName = @"Nick";
@try
{
	Upload *upload = [uploadService getAllFilesByUser:userName];
} @catch(App42Exception *exception) {
	int appErrorCode = exception.appErrorCode;
	int httpErrorCode = exception.httpErrorCode;
	if(appErrorCode == 2102)
	{
		// Handle here for Not found (Files for the User 'Nick' does not Exist )
	}  
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	NSString *jsonText = exception.reason; 	
}                        
String userName = "Nick";
try
{
	Upload upload = uploadService.getAllFilesByUser(userName);
}
catch(App42Exception ex)
{
	int appErrorCode = ex.getAppErrorCode();
	int httpErrorCode = ex.getHttpErrorCode();
	if(appErrorCode == 2102)
	{
		// Handle here for Not found (Files for the User 'Nick' does not Exist )
	}  
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = ex.getMessage(); 	
}  
String userName = "Nick";
try
{
	Upload upload = uploadService.getAllFilesByUser(userName);
}
catch(App42Exception ex)
{
	int appErrorCode = ex.getAppErrorCode();
	int httpErrorCode = ex.getHttpErrorCode();
	if(appErrorCode == 2102)
	{
		// Handle here for Not found (Files for the User 'Nick' does not Exist )
	}  
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = ex.getMessage(); 	
}  
String userName = "Nick";
App42Log.SetDebug(true);        //Prints output in your editor console
uploadService.GetAllFilesByUser(userName, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
    public void OnException(Exception e)
    {
	    App42Exception ex = (App42Exception)e; 
        int appErrorCode = ex.GetAppErrorCode();
        int httpErrorCode = ex.GetHttpErrorCode();
	if(appErrorCode == 2102)
	{
		// Handle here for Not found (Files for the User 'Nick' does not Exist )
	}  
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = ex.GetMessage(); 	
    }
    
     public void OnSuccess(object response)
    {
        App42Log.Console("Response is " + response.ToString());
    }
    
}
var userName = "Nick",
appErrorCode ;
uploadService.getAllFilesByUser(userName,{
	success: function(object){
	},
	error: function(error)
	{
		var uploadObj = JSON.parse(error);
		appErrorCode = uploadObj.app42Fault.appErrorCode;
		if(appErrorCode == 2102)
		{
			// Handle here for Not found (Files for the User 'Nick' does not Exist )
		}  
		else if(appErrorCode == 1401){
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500){
			// handle here for Internal Server Error
		}
	}
});
String userName = "Nick";
local App42CallBack = {}
uploadService:getAllFilesByUser(userName,App42CallBack)
function App42CallBack:onSuccess(object)
	print("Response Success is "..object:getResponseSuccess())
end
function App42CallBack:onException(exception)
	local appErrorCode = exception:getAppErrorCode()
	if appErrorCode == 2102 then
		-- Handle here for Not found (Files for the User 'Nick' does not Exist )
	elseif appErrorCode == 1401 then
		-- handle here for Client is not authorized
	elseif appErrorCode == 1500 then
		-- handle here for Internal Server Error
	end
end
const char* userName = "Nick";
uploadService->GetAllFilesByUser(userName, this, app42callfuncND_selector(Sample_Class::onUploadRequestCompleted));

void Sample_Class::onUploadRequestCompleted(App42CallBack *sender, void *response)
{
    App42UploadResponse *uploadResponse = (App42UploadResponse*)response;
    printf("\ncode=%d",uploadResponse->getCode());
    printf("\nResponse Body=%s",uploadResponse->getBody().c_str());
    if(uploadResponse->isSuccess)
    {
        // Handle Success Response here
    }
    else
    {
        printf("\nerrordetails :%s",uploadResponse->errorDetails.c_str());
        printf("\nerrorMessage :%s",uploadResponse->errorMessage.c_str());
        printf("\nappErrorCode :%d",uploadResponse->appErrorCode);
        printf("\nhttpErrorCode:%d",uploadResponse->httpErrorCode);
        
        if(uploadResponse->appErrorCode == 2102)
		{
			// Handle here for Not found (Files for the User 'Nick' does not Exist )
		}  
		else if(uploadResponse->appErrorCode == 1401){
			// handle here for Client is not authorized
		}
		else if(uploadResponse->appErrorCode == 1500){
			// handle here for Internal Server Error
		}
    }
}
String userName = "Nick";
try 
{
	Upload upload = uploadService.GetAllFilesByUser(userName);
}
catch(App42Exception exception) 
{
	int appErrorCode = exception.GetAppErrorCode();
	int httpErrorCode = exception.GetHttpErrorCode();
	if(appErrorCode == 2102)
	{
		// Handle here for Not found (Files for the User 'Nick' does not Exist )
	}  
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = exception.GetMessage(); 	
}        
$userName = "Nick";
try
{
	$upload = $uploadService->getAllFilesByUser($userName);
} catch(App42Exception $exception) 
{
	$appErrorCode =$exception->getAppErrorCode();
	$httpErrorCode = $exception->getHttpErrorCode();
	if($appErrorCode == 2102)
	{
		// Handle here for Not found (Files for the User 'Nick' does not Exist )
	}  
	else if($appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if($appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	$jsonText = $exception->getMessage(); 	
}
Coming Soon
userName = "Nick";
begin
	upload = uploadService.get_all_files_by_user(userName);
rescue App42Exception => ex
	appErrorCode = ex.app_error_code;
	httpErrorCode = ex.http_error_code;
	if(appErrorCode == 2102)
		#Handle here for Not found (Files for the user <userName> do not exist.)
	elsif(appErrorCode == 1401)
		#handle here for Client is not authorized
	else(appErrorCode == 1500)
		#handle here for Internal Server Error
	end
	jsonText = ex.getMessage(); 
end 
var userName:String = "Nick"; 
uploadService.getAllFilesByUser(userName,new callback());	 
public class callback implements App42CallBack  
{   
	public function onSuccess(response:Object):void  
	{  
		var upload:Upload = Upload(response);
		trace("Response is " + upload) 
	}  
	public function onException(exception:App42Exception):void  
	{  
		var appErrorCode:int = exception.getAppErrorCode();  
		var httpErrorCode:int = exception.getHttpErrorCode();  
		if(appErrorCode == 2102)
		{
			// Handle here for Not found (Files for the User 'Nick' does not Exist )
		}
		else if(appErrorCode == 1401)
		{
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500)
		{
			// handle here for Internal Server Error
		}
	}  	
} 
Coming Soon

Error Codes

Functions in Upload API might throw exceptions with following HTTP and Application Error Codes (along with their descriptions):

1400 - BAD REQUEST - The Request parameters are invalid. 1401 - UNAUTHORIZED - Client is not authorized. 1500 - INTERNAL SERVER ERROR - Internal Server Error. Please try again. 2100 - BAD REQUEST - The Request parameters are invalid. File by the name '${name}' already Exists 2101 - NOT FOUND - Files do not exist. 2102 - NOT FOUND - Files for the user '@userName' do not exist. 2103 - NOT FOUND - The file with the name '@name' does not exist. 2104 - NOT FOUND - There are no files to remove. 2105 - NOT FOUND - The file with type '@type' does not exist. 2106 - NOT FOUND - The number of files are less than the specified offset : + "offset". 2107 - NOT FOUND - The number of files for the user '@userName' are less than the specified offset : + "offset". 2108 - NOT FOUND - The number of files with type '@type' are less than the specified offset : + "offset". 2110 - NOT FOUND - Group by the name '@groupName' for user '@userName' does not exists.' 2111 - NOT FOUND - Group by the name '@groupName' friends does not exists.' 2112 - NOT FOUND - User by the name '@userName' friends does not exists.' 2113 - NOT FOUND - User by the name '@userName' friends does not exists.' 2114 - NOT FOUND - User by the name '@userName' friends does not exists.'