        (mu4e~view-mime-part-to-temp-file (cdr (+mu4e-view-select-attachment)))))
 
     (defun +mu4e-view-select-part ()
-      (let ((parts (mu4e~view-gather-mime-parts)) partinfo labeledparts maxfnamelen fnamefmt)
+      (let ((parts (mu4e~view-gather-mime-parts)) partinfo labeledparts
+            maxfnamelen fnamefmt maxsizelen sizefmt)
         (dolist (part parts)
           (push (list :index (car part)
                       :mimetype (if (string= "text/plain" (caaddr part))

                                  (caaddr part))
                      :type (car (nth 5 part))
                      :filename (cdr (assoc 'filename (assoc "attachment" (cdr part))))
                      :part part)
                partinfo))
        (setq maxfnamelen (apply #'max 7 (mapcar (lambda (i) (length (plist-get i :filename))) partinfo))
              fnamefmt (format " %%-%ds  " maxfnamelen))
        (dolist (pinfo partinfo)
          (push (cons (concat (propertize (format "%-2s " (plist-get pinfo :index)) 'face '(bold font-lock-type-face))
                              (when (featurep 'all-the-icons)
                                (all-the-icons-icon-for-file (or (plist-get pinfo :filename) "")))
                              (format fnamefmt (or (plist-get pinfo :filename)
                                                   (propertize (plist-get pinfo :type) 'face '(italic font-lock-doc-face))))
                              (propertize (plist-get pinfo :mimetype) 'face 'font-lock-constant-face))
                      (plist-get pinfo :part))
                labeledparts))

        (dolist (part parts)
          (let ((fname (cdr (assoc 'filename (assoc "attachment" (cdr part))))))
            (when fname
              (push (cons (concat (format "%-2s " (car part))
                                  (when (featurep 'all-the-icons) (all-the-icons-icon-for-file fname))
                                  (format " %s " fname)
                                  (format "(%s)" (file-size-human-readable (with-current-buffer (cadr part) (buffer-size)))))
                          part)
                    files))))
        (if files
