API Home       Error Codes       API Keys       Showcase       Forum/Discussions

imageloop API function

imagelooop.uploadFilesForm

Upload files using a HTML FORM.
Category: Image functions
Subcategory: Upload
Description: Upload files using a HTML FORM.Use the filename attribute of the Content-Disposition multipart header to specify the image name.

Parameters

Only mandatory parameters must be present for an API call on this function. Parameters marked as a list can occur multiple times in both SOAP and HTTP-RPC style requests.
Name Type Mandatory is List Description
looopID uuid ID of the looop to load meta data for
uploadFile multipartfile required List upload file data
imageName string Name of the image
imageDescription string Description of the image
createSetupLooop boolean pass as true to create a setup looop context, if none exists
name string DNS name of the looop to create
descriptiveName string Visible name of the looop to create
description string Description of the looop to create
looopExternalLink string external link of the looop to create
accessType string looop access type of the looop to create. default is PRIVATE
redirectType int redirect type - 0 = no redirect (standard XML response), 1 = redirect to looop page, 2 = redirect to first uploaded photo page
cookie string name of the cookie to place the uploaded image ID in (default: 'upload-'+looopId)
webPlayerType string web player type. Only evaluated if createSetupLooop == true.
playerConfig map looop player configuration. Only evaluated if createSetupLooop == true.
title string title of the new image
coordinates string looop coordinates (latitude;longitude)
coordinatesAddress string looop coordinates address string
userEmail string guestbook functionality: email address of guestbook entry author
userFirstName string guestbook functionality: first name of guestbook entry author
userLastName string guestbook functionality: last name of guestbook entry author
userMobile string guestbook functionality: mobile phone numer of guestbook entry author
addSubscription boolean unused

Return Values

The presence of return values depend on the meaning of the API function and status of the requested object. For example, the description value of a looop will not be returned, if it has not been set.
Name Type is List Description
imageId uuid List ID of the created images
looopId uuid List ID of the looop

Errors / Exceptions

Error Code Name
2001 imagelooop.InvalidApiKeyException
2005 imagelooop.InternalErrorException
2002 imagelooop.InvalidParameterNameException
3004 imagelooop.PermissionDeniedException
3000 imagelooop.PrimaryObjectNotFoundException
4000 imagelooop.StorageException
2006 imagelooop.InvalidParameterValueException
3001 imagelooop.InvalidDnsNameException
3002 imagelooop.DeadwordException

API Call examples

HTTP-RPC

Request:
The line breaks and white spaces are for better reading only. All request parameters can be passed in the HTTP POST request body instead of a HTTP GET parameter in a URL. Valid HTTP POST content types are multipart/form-data for file uploads and application/x-www-form-urlencoded for usual HTML forms.

http://www.imageloop.com/httprpc/?apiKey=YOUR-API-KEY
    &f=imagelooop.uploadFilesForm
    &h=yourwebsite.com  - or -  &accessToken=application-access-token
    &looopID=uuiduuid-uuid-uuid-uuid-uuiduuiduuid (optional)
    &uploadFile=
    &uploadFile= (multiple possible)
    &imageName=string-value (optional)
    &imageDescription=string-value (optional)
    &createSetupLooop= (optional)
    &name=string-value (optional)
    &descriptiveName=string-value (optional)
    &description=string-value (optional)
    &looopExternalLink=string-value (optional)
    &accessType=string-value (optional)
    &redirectType= (optional)
    &cookie=string-value (optional)
    &webPlayerType=string-value (optional)
    &playerConfig= (optional)
    &title=string-value (optional)
    &coordinates=string-value (optional)
    &coordinatesAddress=string-value (optional)
    &userEmail=string-value (optional)
    &userFirstName=string-value (optional)
    &userLastName=string-value (optional)
    &userMobile=string-value (optional)
    &addSubscription= (optional)




Sample response

Sample Response to illustrate what's returned (XML schema) :
The line breaks and white spaces are for better reading only.

<imag:Response xmlns:imag="http://www.imageloop.com/imagelooop-api-xsd/">
   <response name="imageId">
      <list>
         <value>uuiduuid-uuid-uuid-uuid-uuiduuiduuid</value>
         <value>uuiduuid-uuid-uuid-uuid-uuiduuiduuid</value>
         ... (more or less value elements) ...
      </list>
   </response>
   <response name="looopId">
      <list>
         <value>uuiduuid-uuid-uuid-uuid-uuiduuiduuid</value>
         <value>uuiduuid-uuid-uuid-uuid-uuiduuiduuid</value>
         ... (more or less value elements) ...
      </list>
   </response>
</imag:Response>

If the function call resulted in an error, no response element but an error element is returned in the above XML. See list of possible errors/exception for the function described on this page.
<imag:Response xmlns:imag="http://www.imageloop.com/imagelooop-api-xsd/">
   <error>
      <errorCode>error-code</errorCode>
      <errorType>error-name</errorType>
      <message>optional error message</message>
   </error>
</imag:Response>

SOAP

This method does not support transport via SOAP, because it sends binary data to the server.