final File f = File.createTempFile(randomFilename, ".unknown");
IOUtils.copy(mpf.getInputStream(), new FileOutputStream(f));
final long guestId = AuthHelper.getGuestId();
final ApiKey apiKey = guestService.getApiKey(apiKeyId);
if (apiKey.getGuestId()!=guestId)
throw new RuntimeException("Attempt to upload file associated to another user's " +
"ApiKey! apiKeyId=" + apiKeyId +
", guestId=" + AuthHelper.getGuestId());
final Connector connector = apiKey.getConnector();
executor.execute( new Runnable() {
@Override
public void run() {
final AbstractUpdater bean = beanFactory.getBean(connector.getUpdaterClass());