Search LiveJournal: 
Welcome to LiveJournal!   Home | News | Help

Welcome!
Login
Create a Journal
Update Journal

Find Users
Random
By Region
By Community
By Interest
Directory Search

LiveJournal
Download
Topics
Paid Accounts

Help & Support
LiveJournal FAQ
Have a question?
Lost Password
Developer Area

Legal
Terms of Service
Privacy
COPPA

 
 
 

 

 

 Username:   Password:   
Mode: uploadpic

Mode Details...
The following are details on the uploadpic request mode.

uploadpic
Description
Upload a user picture.
Request
modeThe protocol request mode: uploadpic
userUsername. Leading and trailing whitespace is ignored, as is case.
passwordPassword in plain-text. Either this needs to be sent, or hpassword.
hpasswordAlternative to plain-text password. Password as an MD5 hex digest. Not perfectly secure, but defeats the most simple of network sniffers.
default1 if this should be the user's default picture, 0 otherwise.
keywordsOptional. A comma-delimited list of keywords which may be used to refer to this picture. Keywords may contain spaces, but may not contain commas, to avoid interfering with LiveJournal's UI (which often displays comma-delimited lists of items). If a keyword is already in use by another image, it will be removed from that image.
dataOptional. Encoded image data. Either this or url must be specified, but not both. The encoding bloats the size of the data by about 2.5x, but since user images are small, we'll live. The client should enforce the image size limit (currently 40K) to avoid uploading megabytes of data (which will be rejected) if the user errs.
urlOptional. Image URL. Either this or data must be specified, but not both.
Response
successOK on success or FAIL when there's an error. When there's an error, see errmsg for the error text. The absence of this variable should also be considered an error.
errmsgThe error message if success was FAIL, not present if OK. If the success variable isn't present, this variable most likely won't be either (in the case of a server error), and clients should just report "Server Error, try again later.".
picidThe ID assigned to the uploaded picture on success. If the picture is a duplicate of an existing picture, the existing picture's ID will be returned.
widthThe width of the uploaded picture.
heightThe height of the uploaded picture.

*

Back to Protocol Modes.
Back to Protocol Documentation.
Back to Developer Area.