code: public String createFrom(String fileName, String base64String) {
          String result;
          String baseName = FilenameUtils.getBaseName(fileName);
          String target = saveBase + baseName;
          String ext = FilenameUtils.getExtension(fileName);
          byte[] content = base64Decode(base64String);
          String downloadedFile = FileUtil.saveToFile(target, ext, content);
          String wikiUrl = getWikiUrl(downloadedFile);
          if (wikiUrl != null) {
              // make href to file
              result = String.format("<a href=\"%s\">%s</a>", wikiUrl, fileName);
          } else {
              result = downloadedFile;
          }
          return result;
      }
docs: Creates a new file with content read from base64 encoded string.
  @param fileName (base) file name to create (if a file with specified name already exists
  a number will be added to make the name unique).
  @param base64String base64 encoded string to decode and use as file content.
  @return location of created file.