code: function getResourceNameByFile (data, schema) {
    // Find all file parameters
    let files = _.filter(schema.properties, { type: "file" });
  
    // If there is exactly ONE file parameter, then we'll use its file name
    if (files.length === 1) {
      let file = data[files[0].name];
      if (file && (file.originalname || file.path)) {
        return {
          name: file.fieldname,
          schema: {
            type: "string"
          },
  
          // Use the original file name, if provided. Otherwise, fallback to the server-side file name
          value: file.originalname || path.basename(file.path)
        };
      }
    }
  }
docs: If the REST resource contains a file (e.g. multipart/form-data or application/x-www-form-urlencoded),
  then we'll use the file name as the resource name.
  
  @param   {*}         data   - The parsed resource data.
  @param   {object}    schema - The JSON schema for the data.
  @returns {PropertyInfo|undefined}