PhotoCloud
From M-Gate Labs Wiki
Photo Cloud is our software package, written in php & java that will allow people to easily upload photos to their web space. The software is called Photo Cloud, because we like to think of the Internet as a giant cloud and we just want to quickly through our photos up into it, so that we can access them from anywhere. After photos are up in the cloud they can be accessed through a web front end or downloaded when Rain is finished, the second Api which will allow for mass dumping from Photo Cloud to a hard drive.
Contents |
About
Photo Cloud is a API for enabling different platforms to upload images to a website. It has been designed so that it isn't tied to one photo system. For example we have two separate test photo cloud servers, one is made for multiple users to upload to a single file system, while the other gives each user their own personal web space. The reason why this can happen is that the Photo Cloud Api can be altered to match the needs of its individual users. The client can talk to any server that implements the Photo Cloud Api, but what the client sees is entirely dependent on how the server is setup.
Notice: The screen shots are from a Mac, but the software package will run on any platform that can run Java 1.5, but Java for the Mac just looks better when taking Screen shots.
Features
- Platform Independent
- Server & Client Side
- Basic Security
- Password is no0t sent via plain text
- Basic Spoofing Protection
- Customization
- Change how the server works, but clients still function
Quick Features
- Simple Upload
- Online Folder Browser
- Open Photo Uploading API
API
The photo cloud API has been written so that it is easy to implement, even on other systems. At the moment the following functions exist. The API inputs standard html POST information and returns XML output. All functions can also return an error state. Normally when an error state is returned the client must login again.
Common API Fields
action:
- Specify what function to call
token
- A one time hash used in the login process, it is actually the md5(challange_token + username + md5(password))
ssid
- SSID for login purposes
api_key
- Your session key for working with the system
api_word
- Your one time key needed for certain methods
methods
getVersion
Description: This method returns the version number and name
input:
- action=getVersion
output:
- name
- Server's name
- owner
- Name of server owner
- version
- The API's version number
- root
- The root folder for every user
getToken
Description:This method returns a challenge token, they are used in the login process
input:
- action=getToken
output:
- token
- ssid
login
Description:This method handles logging in. The password is never sent in the clear text, but is modified by a one time hash.
input:
- action=login
- username
- token
- ssid
output:
- api_key
getWord
Description:To make uploading a bit more secure a two step process is put in place. Before uploading a client must request a word. The word is used as a one time key that can be used to upload a single file.
input:
- action=getWord
- username
- api_key
output:
- api_word
upload
Description:This method handles the upload process, multiple fields can be passed along with the image to increase the information about the file.
input:
- action=upload
- username
- api_key
- api_word
- image
output:
- msg
- The possible value is OK or FAIL with the error message saved in the error tag
logout
Description:Call this method to logout.
input
- username
- api_key
output
- error
getContents
Decription: This method takes a folder ID and returns the contents of a folder. It will be useful for determining where to upload pictures. All clients will not need to see folders and files so a filter can be applied for FILES, FOLDERS or BOTH.
input:
- action=getContents
- username
- api_key
- folder_id
- filter
output:
- folders
- files
makeFolder
Description: This method takes a parent folder ID and name and creates a new folder.
input:
- action=makeFolder
- username
- api_key
- api_word
- folder_id
- folder_name
output:
- msg
Future API
Some methods have not been implemented yet, but are still being planned.


