src/org/github/solegaonkar/photography/framework/FlickrUtil.java
/**
	 * Upload the photograph to Flickr; add it to the corresponding albums - creating new albums if required.
	 * 
	 * @param record
	 * @throws Exception
	 */
Upload the photograph to Flickr; add it to the corresponding albums - creating new albums if required.

@param record
@throws Exception
Upload the photograph to Flickr ; add it to the corresponding albums - creating new albums if required . @param record @throws Exception
public static void upload(Record record) throws Exception {
		UploadMetaData metaData = new UploadMetaData();
		metaData.setPublicFlag(true);
		metaData.setDescription(record.getDescription());
		metaData.setContentType(Flickr.CONTENTTYPE_PHOTO);
		metaData.setSafetyLevel(Flickr.SAFETYLEVEL_SAFE);
		metaData.setTitle(makeSafeFilename(record.getTitle()));
		String flickrId = uploader.upload(new File(record.getPath()), metaData);
		if (flickrId != null) {
			record.setFlickrId(flickrId);
			for (String album : record.getAlbums()) {
				if (!albumMap.containsKey(album)) {
					photosetInterface.create(album, album, flickrId);
				} else {
					photosetInterface.addPhoto(albumMap.get(album).getId(), flickrId);
				}
			}
		}
	}
public static void upload ( Record record ) throws Exception { UploadMetaData metaData = new UploadMetaData ( ) ; metaData . setPublicFlag ( true ) ; metaData . setDescription ( record . getDescription ( ) ) ; metaData . setContentType ( Flickr . CONTENTTYPE_PHOTO ) ; metaData . setSafetyLevel ( Flickr . SAFETYLEVEL_SAFE ) ; metaData . setTitle ( makeSafeFilename ( record . getTitle ( ) ) ) ; String flickrId = uploader . upload ( new File ( record . getPath ( ) ) , metaData ) ; if ( flickrId != null ) { record . setFlickrId ( flickrId ) ; for ( String album : record . getAlbums ( ) ) { if ( ! albumMap . containsKey ( album ) ) { photosetInterface . create ( album , album , flickrId ) ; } else { photosetInterface . addPhoto ( albumMap . get ( album ) . getId ( ) , flickrId ) ; } } } }
Upload the photograph to Flickr; add it to the corresponding albums - creating new albums if required.
Upload the photograph to Flickr ; add it to the corresponding albums - creating new albums if required .