public void upload(MultipartHttpServletRequest request,
HttpServletResponse response,
@RequestParam("apiKeyId") long apiKeyId) throws IOException {
Iterator<String> itr = request.getFileNames();
MultipartFile mpf = request.getFile(itr.next());
final String originalFilename = mpf.getOriginalFilename();
System.out.println(originalFilename +" uploaded!");
final String randomFilename = UUID.randomUUID().toString() + "-";
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 " +