docs: public String addMediaEntry(final Entry entry, final String slug, final InputStream is) throws Exception {
          synchronized (FileStore.getFileStore()) {
  
              // Save media file temp file
              final Content content = entry.getContents().get(0);
              if (entry.getTitle() == null) {
                  entry.setTitle(slug);
              }
              final String fileName = createFileName(slug != null ? slug : entry.getTitle(), content.getType());
              final File tempFile = File.createTempFile(fileName, "tmp");
              final FileOutputStream fos = new FileOutputStream(tempFile);
              Utilities.copyInputToOutput(is, fos);
              fos.close();
  
              // Save media file
              final FileInputStream fis = new FileInputStream(tempFile);
              saveMediaFile(fileName, content.getType(), tempFile.length(), fis);
              fis.close();
              final File resourceFile = new File(getEntryMediaPath(fileName));
  
              // Create media-link entry
              updateTimestamps(entry);
  
              // Save media-link entry
              final String entryPath = getEntryPath(fileName);
              final OutputStream os = FileStore.getFileStore().getFileOutputStream(entryPath);
              updateMediaEntryAppLinks(entry, resourceFile.getName(), true);
              Atom10Generator.serializeEntry(entry, new OutputStreamWriter(os, "UTF-8"));
              os.flush();
              os.close();
  
              // Update feed with new entry
              final Feed f = getFeedDocument();
              updateMediaEntryAppLinks(entry, resourceFile.getName(), false);
              updateFeedDocumentWithNewEntry(f, entry);
  
              return getEntryEditURI(fileName, false, true);
          }
      }