The LinkGalleryFiles method links specific Raw files to specific photos in a gallery. This method is new in API 1.8.

void LinkGalleryFiles(
    long[] fileIds,
    long[] photoIds


An array of file identifiers to link.
An array of photo identifiers the files should be linked to.


The arrays provided in the fileIds and photoIds parameters should be of the same length. Each element of the fileIds array identifies a gallery file to be linked and the element of the photoIds array in the same position identifies the photo the file should be linked to. To remove a link, specify zero in the corresponding position of the photoIds array.

All file and photo identifiers must refer to files and photos in the same gallery.

See Also