Add new file type icons


Usage scenarios

I’m a GUI designer,we use Seafile to store design files,most of these extension names are .sketch,.psd,.ai.,aep.

But Seahub does not offer these extensions’ thumbnails, it’s difficult for us to identify which is which。

It’s a big deal for us to make custom style for different file types.

My attempt

I tried to search in Seahub’s Github repo, I found result and simply modified them。

I add ’ ‘sketch’ : ‘sketch.png’, ’ in these files’ FILEEXT_ICON_MAP:

  • seahub/base/templatetags/
  • media/assets/scripts/common.xxxx.js
  • media/assets/scripts/common.js
  • static/scripts/common.js

I add ’ GRAPHIC: (‘aep’,‘psd’,‘sketch’,‘ai’,‘c4d’,‘blend’) ’ in this file’s PREVIEW_FILEEXT:

  • seahub/utils/

But the result is, the new Sketch icon only works in shared folder,but not works in Normal Folder.


  1. How can I add new icon for specific file type?
    请问如何添加新的文件种类并自定义 Icon 呢?

  2. How to add specific preview page for specific file type?(for example, I want use a Library called ‘sketch-web-viewer’ to preview Sketch Files online)
    请问如何把一些自定义预览库接入 Seafile,然后支持新格式的预览呢?

1 Like