code: func (pr *publishRequest) subjectFile(described map[string]*search.DescribedBlob) (*publish.PageFile, error) {
  	subdes := described[pr.subject.String()]
  	contentRef, ok := subdes.ContentRef()
  	if !ok {
  		return nil, nil
  	}
  	fileDes, err := pr.ph.describe(contentRef)
  	if err != nil {
  		return nil, err
  	}
  	if fileDes.File == nil {
  		// most likely a dir
  		return nil, nil
  	}
  
  	path := []blob.Ref{pr.subject, contentRef}
  	downloadURL := pr.SubresFileURL(path, fileDes.File.FileName)
  	thumbnailURL := ""
  	if fileDes.File.IsImage() {
  		thumbnailURL = pr.SubresThumbnailURL(path, fileDes.File.FileName, 600)
  	}
  	fileName := html.EscapeString(fileDes.File.FileName)
  	return &publish.PageFile{
  		FileName:     fileName,
  		Size:         fileDes.File.Size,
  		MIMEType:     fileDes.File.MIMEType,
  		IsImage:      fileDes.File.IsImage(),
  		DownloadURL:  downloadURL,
  		ThumbnailURL: thumbnailURL,
  		DomID:        contentRef.DomID(),
  		Nav: func() *publish.Nav {
  			return nil
  		},
  	}, nil
  }
docs: // subjectFile returns the relevant PageFile if the described subject is a file permanode.