HOW TO: Retrieve photo and document names
When photos or documents are uploaded to flexmls by listing agents, users are given the ability to enter a publicly displayed name along with the attachment. These additional names can be used to help describe a picture by giving it context or explaining the location where the photo was taken.
Through the flexmls RETS server, these names are provided alongside the photos and documents that are retrieved. When a GetObject request is made, a "Content-Description" header is included (along with the other expected headers). The value of this header contains the name provided for that object.
For example, the following represents an example response from our RETS server:
HTTP/1.1 200 OK
Content-Type: multipart/parallel; boundary="FLEXlwyQfTEG86CODzQzeRn8JNCpPMTCcbf4Vanu1FC8WeZe4BQzIZ"
Date: Tue, 17 Sep 2013 21:22:23 GMT
Content-Description: Front Exterior
Content-Description: Expansive View of Rear of House
The above response shows 2 photos returned by the GetObject request each with a "Content-Description" header describing the object.
You’ll need to consult the documentation for the tool you’re using to determine the best way to extract this information. For users of libRETS, GetDescription() can be used to retrieve that value. For users of PHRETS, the "Content-Description" key is available for each object.