Icons for Each File Type

Add unique icons for each file type. Currently supports doc, docx, pdf, and zip. Let us know what other file types we should support via support!

Code

Filename: gpfup-file-icons.css

/**
 * Gravity Perks // File Upload Pro // Icons for Each File Type
 * https://gravitywiz.com/documentation/gravity-forms-file-upload-pro/
 *
 * Add unique icons for each file type. Currently supports doc, docx, pdf, and zip. Let us know what other file
 * types we should support [via support](https://gravitywiz.com/support/)!
 */
.gpfup__file-icon svg {
	visibility: hidden;
}
.gpfup__file[data-file-ext="zip"] .gpfup__file-icon {
	background: url( https://cdn.jsdelivr.net/npm/pretty-file-icons@2.2.1/svg/zip.svg );
}
.gpfup__file[data-file-ext="doc"] .gpfup__file-icon,
.gpfup__file[data-file-ext="docx"] .gpfup__file-icon {
	background: url( https://cdn.jsdelivr.net/npm/pretty-file-icons@2.2.1/svg/doc.svg );
}
.gpfup__file[data-file-ext="pdf"] .gpfup__file-icon {
	background: url( https://cdn.jsdelivr.net/npm/pretty-file-icons@2.2.1/svg/pdf.svg );
}

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.