Coder Social home page Coder Social logo

mksondej / mattermost-file-list Goto Github PK

View Code? Open in Web Editor NEW
77.0 6.0 11.0 2.56 MB

Adds a paged and searchable file list to each channel. The list is opened through a button in the top panel. Through the list you can obtain public or normal links to the files, open or delete them.

License: Apache License 2.0

Makefile 11.65% Go 30.98% HTML 0.14% JavaScript 53.90% Dockerfile 0.20% PowerShell 3.13%

mattermost-file-list's Introduction

Mattermost File List

Hi there!,

I'm glad that my project piqued your attention but I have to be honest:

Since version 5.35.0 of Mattermost, an official file list functionality is already built-in. Because of that, this plugin doesn't really make sense anymore, so I'd recommend not installing it and just updating your server to the latest version. Maybe I'll think of some additional useful features in the future, but I don't have an opportunity to work with Mattermost very often, so it may take some time.

I appreciate all of the stars on Github, I really do.

Cheers,

Mike, the dev

Adds a paged, searchable and sortable file list to each channel and team. You can open the channel file list through a button in the top panel. The team file list is available above channel list, but it has to be first enabled in the plugin settings. Admins can additionally access a list of all files from all channels, even where they are not a member.

Through the list you can obtain public or normal links to the files, open and delete entire posts.

Preview:

Sample list

How to install

  1. Grab the latest .tar.gz archive from Releases.
  2. Follow standard Mattermost plugin installation procedure (either install it through the web system console or directly by extracting it to /plugins/ folder).
  3. Remember to check out plugin settings for additonal features!

How to develop

This projects uses Docker containers to build, so you don't have to install any dependencies other than Docker. Simply run docker-build.ps1 (on *nix systems you need Powershell) and the project will be built inside an autmatically configured temporary container. The container caches entire GOPATH inside .docker_cache directory, so it should be fast and dependencies won't be redownloaded everytime you run the build. Have fun :)

Optionally you can also pass -withPreview which will spin up the mattermost-preview instance (if it's not running) and deploy the plugin to it.

Troubleshooting

1. Error uploading plugin

If you are using a suported platform, can upload other plugins but still receive an error trying to upload this one, check the Maximum File Size setting in Mattermost's configuration as mentioned in:

blindsidenetworks/mattermost-plugin-bigbluebutton#101 (comment)

Thanks @bbodenmiller for this find :)

mattermost-file-list's People

Contributors

mksondej avatar dependabot[bot] avatar emi80 avatar nopeslide avatar

Stargazers

cednore avatar jon ⚝ avatar Omar Faruque Tuhin avatar daniel sieradski avatar  avatar Julian Guttzeit avatar  avatar  avatar Jaden Wang avatar Philipp Huth avatar mouson avatar Michael Bondarevsky avatar Dinh Ngoc Hien avatar ClauS avatar  avatar panda avatar Evgeniy Udodov avatar Leander Melms avatar André_Teixeira_1998 avatar Erfan Hanifezade avatar Mohammad Javad Naderi avatar Peyman Najafi avatar Roy Orbitson avatar George Pantazis avatar Jason Todd avatar Aaron Josh avatar Robert Krajewski avatar mdheller avatar Harley Trung avatar Marco Silva avatar Craig avatar Lukas Martini avatar Jacky Chan avatar It Mgr avatar Winston Hoy avatar ik5 avatar Emanuel Bennici avatar sggggy avatar Oleg "livelace" Popov avatar Alexander Martínez Méndez avatar  avatar Maximilian Gärber avatar Binh Nguyen avatar  avatar Narek avatar Hadi Azaddel avatar Bartłomiej Poniatyszyn avatar Ahmad Haghighi avatar Ben Schumacher avatar Deutrino avatar Kai Woerner avatar  avatar red avatar Jihyeon Gim avatar Isagani Mendoza avatar Max Kerp avatar Seweryn Zeman avatar  avatar  avatar  avatar Leho Kraav avatar Wojciech Sendera avatar Stephen Scotter avatar Johan Hallberg avatar Keith Petro avatar  avatar Gleb avatar Chetanya Kandhari avatar Harshil Sharma avatar Santiago Saavedra avatar  avatar Markus John avatar YANO Tetsuro avatar Fabián avatar  avatar Quyu Kong avatar Andrew avatar

Watchers

Leho Kraav avatar James Cloos avatar  avatar  avatar Philipp Huth avatar ClauS avatar

mattermost-file-list's Issues

Feature Request: Team File Listing

Could you please extend this to also facilitate showing all files that are part of a team?

Obviously admins would see all files and non-admins would see files that they have permission to access, but this would be very helpful in finding things quickly that have been uploaded.

error upload plugin

Hello, fantastic project for mattermost, but I have a problem, my platform is mattermost via Qnap NAS server and I understand that installed under Qnap QTS system on your embedded Linux. All plugins can be installed via console without problem or through their market place but your plugin gives the following error. I'm not a programmer, just a system user, could anything be done to make the installation work?

An error was encountered when extracting the plugin. Review the contents of the plugin file and try again.

Thanks a lot!

Plugin Security

Hello,

I was hoping to install your plugin for my team but I was wondering about the security implications. I'm not too familiar with Go, otherwise I would look for myself, but I was wondering about SQL Injections and potentially open API routes.

Thank you
Michael

Integration with Mattermost Cloud

Hi,

I came across this plugin and it looks incredibly useful. It seems like it's still considered a "custom plugin" and therefore can only be added via tarball on self-hosted instances of Mattermost. Is there any plan to get it added to the Plugin Marketplace so it can be added to Mattermost Cloud instances?

Again, this looks fantastic. Thanks for your help!

PROPOSAL - Jump to Post

It would be nice to be able to jump to a post that's related to a particular attachement. This could be similar in appearance to the 'Jump' link that's provided by the SEARCH RESULTS when performing a search.

Disable "Copy Link" Action when FileSettings.EnablePublicLink=false

Just ran into an issue where when clicking "Copy Link" Action whilst FileSettings.EnablePublicLink=false the plugin doesn't do anything, provides no visual feedback that it failed to copy the link.

Steps to reproduce:

  1. Set FileSettings.EnablePublicLink=false
  2. Click "Files in channel" button
  3. Make sure the list contains at least one file
  4. Click "Copy Link" action

Observed:
Link is not copied, and no visual feedback is provided that it wasn't copied. Error is seen in the developer console.

Expected:
Either show an error dialog to inform the user that the FileSettings.EnablePublicLink option is disabled or disable the "Copy Link" action in that case.

Files on chanel

I have this problem when trying to open files in Chanel:

"An error occurred in the File List plugin. Please notify the administrator. A detailed error message was added to the server log."

And I can't find the server log file.

Delete file option presented even when don't have permissions to delete file

I was a team admin so could delete files. Now I removed myself as team admin but still have option to delete files via plugin. I tried refreshing as well as logout and log back in. Is there some sort of file list caching going on? When I try to use it I get this error message:

image

image

image

image

I shouldn't be presented with delete option if I do not have permissions to delete files.

PROPOSAL - Ability to preview files.

In the plugin, we can list the files for any channel. It would be great if we could preview the files from the file list modal itself.

For each file, it would open the mattermost file preview/info modal depending on the file type.

This could be implemented by using the ability to fire Redux actions from the webapp part of the plugin. You could open the modal passing the required values to the action.

Plugin Channel Header Component Changes

Mattermost recently made an update to the Plugin component location changing from the channel header to the new App Bar.

If your plugin registers an icon in the channel header, you will need to make some minor changes to your plugin to smoothly transition to this new UI. We’ve made it simple to register both a channel header icon and add the new App Bar registration simultaneously. This way, your plugin will work on older servers without the App Bar (using the channel header), and when the App Bar is enabled on a server. The App Bar component will automatically be used instead. You can use this PR as an example of a plugin implementing an App Bar icon.

Please see this forum post for more details on this change and reach out to us on our Integrations and Apps channel with any questions.

Removed files

The deleted files are still findable with this plugin.

Again, great plugin.

Failed to enable the plugin

Hi, thanks for developing this plugin and it looks helpful. However, I tried to install the plugin but got an error message when enabling. We are currently on Mattermost v5.14.0 and deployed with matter-docker in production.

When I tried to enable the plugin, it gives the following error message from the system log:

Unrecognized remote plugin message:

This usually means that the plugin is either invalid or simply
needs to be recompiled to support the latest protocol.
unable to start plugin: mattermost-file-list
github.com/mattermost/mattermost-server/plugin.(*Environment).Activate
        /go/src/github.com/mattermost/mattermost-server/plugin/environment.go:259
github.com/mattermost/mattermost-server/app.(*App).SyncPluginsActiveState
        /go/src/github.com/mattermost/mattermost-server/app/plugin.go:96
github.com/mattermost/mattermost-server/app.(*App).InitPlugins
        /go/src/github.com/mattermost/mattermost-server/app/plugin.go:127
github.com/mattermost/mattermost-server/app.(*Server).RunOldAppInitalization.func6
        /go/src/github.com/mattermost/mattermost-server/app/server_app_adapters.go:147
github.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners.func1
        /go/src/github.com/mattermost/mattermost-server/config/emitter.go:35
sync.(*Map).Range
        /usr/local/go/src/sync/map.go:333
github.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners
        /go/src/github.com/mattermost/mattermost-server/config/emitter.go:33
github.com/mattermost/mattermost-server/config.(*commonStore).set
        /go/src/github.com/mattermost/mattermost-server/config/common.go:90
github.com/mattermost/mattermost-server/config.(*FileStore).Set
        /go/src/github.com/mattermost/mattermost-server/config/file.go:97
github.com/mattermost/mattermost-server/app.(*App).SaveConfig
        /go/src/github.com/mattermost/mattermost-server/app/config.go:378
github.com/mattermost/mattermost-server/app.(*App).EnablePlugin
        /go/src/github.com/mattermost/mattermost-server/app/plugin.go:320
github.com/mattermost/mattermost-server/api4.enablePlugin
        /go/src/github.com/mattermost/mattermost-server/api4/plugin.go:252
github.com/mattermost/mattermost-server/web.Handler.ServeHTTP
        /go/src/github.com/mattermost/mattermost-server/web/handlers.go:144
github.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1
        /go/src/github.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler/gzip.go:336
net/http.HandlerFunc.ServeHTTP
        /usr/local/go/src/net/http/server.go:1995
github.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux.(*Router).ServeHTTP
        /go/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux/mux.go:212
github.com/mattermost/mattermost-server/app.(*RateLimiter).RateLimitHandler.func1
        /go/src/github.com/mattermost/mattermost-server/app/ratelimit.go:109
net/http.HandlerFunc.ServeHTTP
        /usr/local/go/src/net/http/server.go:1995
net/http.serverHandler.ServeHTTP
        /usr/local/go/src/net/http/server.go:2774
net/http.(*conn).serve
        /usr/local/go/src/net/http/server.go:1878
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1337>

Colors off in dark theme

Unfortunately colors are off in obvious areas:
example

When using a dark theme such as this:

{"sidebarBg":"#1f1f1f","sidebarText":"#d9d9d9","sidebarUnreadText":"#ab0707","sidebarTextHoverBg":"#302e30","sidebarTextActiveBorder":"#8f0a0c","sidebarTextActiveColor":"#d9d9d9","sidebarHeaderBg":"#1f1f1f","sidebarHeaderTextColor":"#d9d9d9","onlineIndicator":"#25b418","awayIndicator":"#c1b966","dndIndicator":"#bf0d1c","mentionBg":"#781214","mentionBj":"#781214","mentionColor":"#aa0909","centerChannelBg":"#1f1f1f","centerChannelColor":"#bfbfbf","newMessageSeparator":"#cc992d","linkColor":"#007ee6","buttonBg":"#0169cb","buttonColor":"#d9d9d9","errorTextColor":"#ff6461","mentionHighlightBg":"#004d13","mentionHighlightLink":"#008cff","codeTheme":"solarized-dark"}

Unable to activate plugin when mm store config in database

Configuration in the Mattermost Database
I deployed mm in k8s by helm, so there is a readonly config.json file mounted from k8s configmap.
The readonly config.json file has not be used by the mm.

When activate the plugin, it has load the config file and there are some other issues cause mm try to fix config and persist the readonly config file.

unable to start plugin: mattermost-file-list: failed to load: failed to persist required changes after load: failed to write file: open /mattermost/config/config.json: read-only file system
github.com/mattermost/mattermost-server/plugin.(*Environment).Activate	/go/src/github.com/mattermost/mattermost-server/plugin/environment.go:251
github.com/mattermost/mattermost-server/app.(*App).SyncPluginsActiveState
	/go/src/github.com/mattermost/mattermost-server/app/plugin.go:100
github.com/mattermost/mattermost-server/app.(*App).InitPlugins
	/go/src/github.com/mattermost/mattermost-server/app/plugin.go:133
github.com/mattermost/mattermost-server/app.(*Server).RunOldAppInitalization.func6
	/go/src/github.com/mattermost/mattermost-server/app/server_app_adapters.go:148
github.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners.func1
	/go/src/github.com/mattermost/mattermost-server/config/emitter.go:35
sync.(*Map).Range
	/usr/local/go/src/sync/map.go:333
github.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners
	/go/src/github.com/mattermost/mattermost-server/config/emitter.go:33
github.com/mattermost/mattermost-server/config.(*commonStore).set
	/go/src/github.com/mattermost/mattermost-server/config/common.go:90
github.com/mattermost/mattermost-server/config.(*DatabaseStore).Set
	/go/src/github.com/mattermost/mattermost-server/config/database.go:148
github.com/mattermost/mattermost-server/app.(*App).SaveConfig
	/go/src/github.com/mattermost/mattermost-server/app/config.go:378
github.com/mattermost/mattermost-server/app.(*App).EnablePlugin
	/go/src/github.com/mattermost/mattermost-server/app/plugin.go:333
github.com/mattermost/mattermost-server/api4.enablePlugin
	/go/src/github.com/mattermost/mattermost-server/api4/plugin.go:298
github.com/mattermost/mattermost-server/web.Handler.ServeHTTP
	/go/src/github.com/mattermost/mattermost-server/web/handlers.go:148
github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1
	/go/src/github.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler/gzip.go:336
net/http.HandlerFunc.ServeHTTP
	/usr/local/go/src/net/http/server.go:1995
github.com/gorilla/mux.(*Router).ServeHTTP
	/go/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux/mux.go:212
net/http.serverHandler.ServeHTTP
	/usr/local/go/src/net/http/server.go:2774
net/http.(*conn).serve
	/usr/local/go/src/net/http/server.go:1878
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1337

Raw logs:

{"level":"info","ts":1574415946.239485,"caller":"go-plugin/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"DefaultServerLocale must be one of the supported locales. Setting DefaultServerLocale to en as default value.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
{"level":"info","ts":1574415946.2395804,"caller":"go-plugin/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"DefaultClientLocale must be one of the supported locales. Setting DefaultClientLocale to en as default value.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
{"level":"info","ts":1574415946.2396028,"caller":"go-plugin/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"AvailableLocales must include DefaultClientLocale. Setting AvailableLocales to all locales as default value.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
{"level":"error","ts":1574415946.2436152,"caller":"mlog/log.go:174","msg":"Unable to activate plugin","plugin_id":"mattermost-file-list","error":"unable to start plugin: mattermost-file-list: failed to load: failed to persist required changes after load: failed to write file: open /mattermost/config/config.json: read-only file system","errorVerbose":"failed to load: failed to persist required changes after load: failed to write file: open /mattermost/config/config.json: read-only file system\nunable to start plugin: mattermost-file-list\ngithub.com/mattermost/mattermost-server/plugin.(*Environment).Activate\n\t/go/src/github.com/mattermost/mattermost-server/plugin/environment.go:251\ngithub.com/mattermost/mattermost-server/app.(*App).SyncPluginsActiveState\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:100\ngithub.com/mattermost/mattermost-server/app.(*App).InitPlugins\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:133\ngithub.com/mattermost/mattermost-server/app.(*Server).RunOldAppInitalization.func6\n\t/go/src/github.com/mattermost/mattermost-server/app/server_app_adapters.go:148\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners.func1\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:35\nsync.(*Map).Range\n\t/usr/local/go/src/sync/map.go:333\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:33\ngithub.com/mattermost/mattermost-server/config.(*commonStore).set\n\t/go/src/github.com/mattermost/mattermost-server/config/common.go:90\ngithub.com/mattermost/mattermost-server/config.(*DatabaseStore).Set\n\t/go/src/github.com/mattermost/mattermost-server/config/database.go:148\ngithub.com/mattermost/mattermost-server/app.(*Server).UpdateConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:53\ngithub.com/mattermost/mattermost-server/app.(*App).UpdateConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:59\ngithub.com/mattermost/mattermost-server/app.(*App).EnablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:328\ngithub.com/mattermost/mattermost-server/api4.enablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/api4/plugin.go:298\ngithub.com/mattermost/mattermost-server/web.Handler.ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/web/handlers.go:148\ngithub.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler/gzip.go:336\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux/mux.go:212\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1878\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337"}
{"level":"info","ts":1574415946.2884111,"caller":"go-plugin/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"DefaultServerLocale must be one of the supported locales. Setting DefaultServerLocale to en as default value.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
{"level":"info","ts":1574415946.2885144,"caller":"go-plugin/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"DefaultClientLocale must be one of the supported locales. Setting DefaultClientLocale to en as default value.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
{"level":"info","ts":1574415946.2885332,"caller":"go-plugin/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"AvailableLocales must include DefaultClientLocale. Setting AvailableLocales to all locales as default value.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
{"level":"error","ts":1574415946.2925034,"caller":"mlog/log.go:174","msg":"Unable to activate plugin","plugin_id":"mattermost-file-list","error":"unable to start plugin: mattermost-file-list: failed to load: failed to persist required changes after load: failed to write file: open /mattermost/config/config.json: read-only file system","errorVerbose":"failed to load: failed to persist required changes after load: failed to write file: open /mattermost/config/config.json: read-only file system\nunable to start plugin: mattermost-file-list\ngithub.com/mattermost/mattermost-server/plugin.(*Environment).Activate\n\t/go/src/github.com/mattermost/mattermost-server/plugin/environment.go:251\ngithub.com/mattermost/mattermost-server/app.(*App).SyncPluginsActiveState\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:100\ngithub.com/mattermost/mattermost-server/app.(*App).InitPlugins.func2\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:183\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners.func1\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:35\nsync.(*Map).Range\n\t/usr/local/go/src/sync/map.go:333\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:33\ngithub.com/mattermost/mattermost-server/config.(*commonStore).set\n\t/go/src/github.com/mattermost/mattermost-server/config/common.go:90\ngithub.com/mattermost/mattermost-server/config.(*DatabaseStore).Set\n\t/go/src/github.com/mattermost/mattermost-server/config/database.go:148\ngithub.com/mattermost/mattermost-server/app.(*Server).UpdateConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:53\ngithub.com/mattermost/mattermost-server/app.(*App).UpdateConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:59\ngithub.com/mattermost/mattermost-server/app.(*App).EnablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:328\ngithub.com/mattermost/mattermost-server/api4.enablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/api4/plugin.go:298\ngithub.com/mattermost/mattermost-server/web.Handler.ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/web/handlers.go:148\ngithub.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler/gzip.go:336\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux/mux.go:212\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1878\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337"}
{"level":"info","ts":1574415946.3499353,"caller":"go-plugin/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"DefaultServerLocale must be one of the supported locales. Setting DefaultServerLocale to en as default value.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
{"level":"info","ts":1574415946.3500009,"caller":"go-plugin/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"DefaultClientLocale must be one of the supported locales. Setting DefaultClientLocale to en as default value.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
{"level":"info","ts":1574415946.3500133,"caller":"go-plugin/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"AvailableLocales must include DefaultClientLocale. Setting AvailableLocales to all locales as default value.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
{"level":"error","ts":1574415946.3533194,"caller":"mlog/log.go:174","msg":"Unable to activate plugin","plugin_id":"mattermost-file-list","error":"unable to start plugin: mattermost-file-list: failed to load: failed to persist required changes after load: failed to write file: open /mattermost/config/config.json: read-only file system","errorVerbose":"failed to load: failed to persist required changes after load: failed to write file: open /mattermost/config/config.json: read-only file system\nunable to start plugin: mattermost-file-list\ngithub.com/mattermost/mattermost-server/plugin.(*Environment).Activate\n\t/go/src/github.com/mattermost/mattermost-server/plugin/environment.go:251\ngithub.com/mattermost/mattermost-server/app.(*App).SyncPluginsActiveState\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:100\ngithub.com/mattermost/mattermost-server/app.(*App).InitPlugins.func2\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:183\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners.func1\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:35\nsync.(*Map).Range\n\t/usr/local/go/src/sync/map.go:333\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:33\ngithub.com/mattermost/mattermost-server/config.(*commonStore).set\n\t/go/src/github.com/mattermost/mattermost-server/config/common.go:90\ngithub.com/mattermost/mattermost-server/config.(*DatabaseStore).Set\n\t/go/src/github.com/mattermost/mattermost-server/config/database.go:148\ngithub.com/mattermost/mattermost-server/app.(*App).SaveConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:378\ngithub.com/mattermost/mattermost-server/app.(*App).EnablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:333\ngithub.com/mattermost/mattermost-server/api4.enablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/api4/plugin.go:298\ngithub.com/mattermost/mattermost-server/web.Handler.ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/web/handlers.go:148\ngithub.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler/gzip.go:336\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux/mux.go:212\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1878\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337"}
{"level":"info","ts":1574415946.3960114,"caller":"go-plugin/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"DefaultServerLocale must be one of the supported locales. Setting DefaultServerLocale to en as default value.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
{"level":"info","ts":1574415946.3960712,"caller":"go-plugin/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"DefaultClientLocale must be one of the supported locales. Setting DefaultClientLocale to en as default value.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
{"level":"info","ts":1574415946.396083,"caller":"go-plugin/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"AvailableLocales must include DefaultClientLocale. Setting AvailableLocales to all locales as default value.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
{"level":"error","ts":1574415946.399258,"caller":"mlog/log.go:174","msg":"Unable to activate plugin","plugin_id":"mattermost-file-list","error":"unable to start plugin: mattermost-file-list: failed to load: failed to persist required changes after load: failed to write file: open /mattermost/config/config.json: read-only file system","errorVerbose":"failed to load: failed to persist required changes after load: failed to write file: open /mattermost/config/config.json: read-only file system\nunable to start plugin: mattermost-file-list\ngithub.com/mattermost/mattermost-server/plugin.(*Environment).Activate\n\t/go/src/github.com/mattermost/mattermost-server/plugin/environment.go:251\ngithub.com/mattermost/mattermost-server/app.(*App).SyncPluginsActiveState\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:100\ngithub.com/mattermost/mattermost-server/app.(*App).InitPlugins\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:133\ngithub.com/mattermost/mattermost-server/app.(*Server).RunOldAppInitalization.func6\n\t/go/src/github.com/mattermost/mattermost-server/app/server_app_adapters.go:148\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners.func1\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:35\nsync.(*Map).Range\n\t/usr/local/go/src/sync/map.go:333\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:33\ngithub.com/mattermost/mattermost-server/config.(*commonStore).set\n\t/go/src/github.com/mattermost/mattermost-server/config/common.go:90\ngithub.com/mattermost/mattermost-server/config.(*DatabaseStore).Set\n\t/go/src/github.com/mattermost/mattermost-server/config/database.go:148\ngithub.com/mattermost/mattermost-server/app.(*App).SaveConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:378\ngithub.com/mattermost/mattermost-server/app.(*App).EnablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:333\ngithub.com/mattermost/mattermost-server/api4.enablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/api4/plugin.go:298\ngithub.com/mattermost/mattermost-server/web.Handler.ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/web/handlers.go:148\ngithub.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler/gzip.go:336\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux/mux.go:212\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1878\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337"}

Database schema warning on Mattermost 5.22.0

Hi @Amonith

I am having an issue with the file-list plugin on Mattermost 5.22.0. The plugins installs and seems to load fin. The channel files list is shown, but when I click on a file I get a 404 error from the server. I am getting the following message in my server logs:

{"level":"info","ts":1589445730.3519459,"caller":"[email protected]/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"The database schema with version 5.22.0 is newer than Mattermost version 5.16.0.\"}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}

I guess my issue might be related to that. Could you please have a look?

Thanks a lot,
Emilio

Plugin repeatedly crashes and won't start

Mattermost version: 5.38.1
Postgres DB
S3 file storage

Errors received when trying to start the plugin:
ep 09 22:00:06 ip-20-10-2-4 mattermost[23269]: {"level":"info","ts":1631224806.668883,"caller":"[email protected]/stream.go:15","msg":"{"level":"info","msg":"Pinging SQL","fields":[{"Key":"database","Type":15,"Integer":0,"String":"master","Interface":null}]}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
Sep 09 22:00:06 ip-20-10-2-4 mattermost[23269]: {"level":"info","ts":1631224806.7665026,"caller":"[email protected]/stream.go:15","msg":"{"level":"warn","msg":"The database schema with version 5.38.0 is newer than Mattermost version 5.16.0."}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
Sep 09 22:00:37 ip-20-10-2-4 mattermost[23269]: {"level":"info","ts":1631224837.1021519,"caller":"[email protected]/stream.go:15","msg":"{"level":"error","msg":"Failed to create index","fields":[{"Key":"error","Type":25,"Integer":0,"String":"","Interface":{"Severity":"ERROR","Code":"42P01","Message":"relation \"idx_posts_channel_id\" does not exist","Detail":"","Hint":"","Position":"","InternalPosition":"","InternalQuery":"","Where":"","Schema":"","Table":"","Column":"","DataTypeName":"","Constraint":"","File":"namespace.c","Line":"429","Routine":"RangeVarGetRelidExtended"}},{"Key":"error","Type":25,"Integer":0,"String":"","Interface":{"Severity":"ERROR","Code":"57014","Message":"canceling statement due to user request","Detail":"","Hint":"","Position":"","InternalPosition":"","InternalQuery":"","Where":"","Schema":"","Table":"","Column":"","DataTypeName":"","Constraint":"","File":"postgres.c","Line":"3082","Routine":"ProcessInterrupts"}}]}","plugin_id":"mattermost-file-list","source":"plugin_stdout"}
Sep 09 22:00:38 ip-20-10-2-4 mattermost[23269]: {"level":"error","ts":1631224838.103351,"caller":"mlog/log.go:251","msg":"RPC call to OnActivate plugin failed.","plugin_id":"mattermost-file-list","error":"unexpected EOF"}
Sep 09 22:00:38 ip-20-10-2-4 mattermost[23269]: {"level":"error","ts":1631224838.115004,"caller":"mlog/log.go:251","msg":"RPC call OnConfigurationChange to plugin failed.","plugin_id":"mattermost-file-list","error":"connection is shut down"}
Sep 09 22:00:38 ip-20-10-2-4 mattermost[23269]: {"level":"error","ts":1631224838.4086642,"caller":"mlog/log.go:251","msg":"Plugin failed to ServeHTTP, RPC call failed","plugin_id":"mattermost-file-list","error":"connection is shut down"}
Sep 09 22:00:43 ip-20-10-2-4 mattermost[23269]: {"level":"error","ts":1631224843.4096894,"caller":"mlog/log.go:251","msg":"Plugin failed to ServeHTTP, muxBroker couldn't Accept request body connection","plugin_id":"mattermost-file-list","error":"timeout waiting for accept"}
Sep 09 22:00:43 ip-20-10-2-4 mattermost[23269]: {"level":"error","ts":1631224843.4096894,"caller":"mlog/log.go:251","msg":"Plugin failed to ServeHTTP, muxBroker couldn't accept connection","plugin_id":"mattermost-file-list","serve_http_stream_id":3,"error":"timeout waiting for accept"}

admin show all files option not working

Running as system admin

Appears it's not working anymore as it's missing from menu as shown in README.md preview. Also verified files from other channels (I'm not part of as system admin) are not showing under All files option.

image

Additional would be nice if setting text clarified if this was talking about system admins or team admins.

Does not work on non-Linux, non-Docker platforms

The plugin ships with precompiled binaries for specific platforms, and no build instructions for other platforms (FreeBSD). Is there anything about this code that makes it hard or impossible to run on other platforms?

Installation on official docker image fails

When uploading the latest release tar.gz Mattermost plugin installation fails with the following error:

"level":"error","ts":1572953682.8417873,"caller":"mlog/log.go:174","msg":"Unable to activate plugin","plugin_id":"mattermost-file-list","error":"unable to generate webapp bundle: mattermost-file-list: unable to copy webapp bundle directory: mattermost-file-list: mkdir client/plugins/mattermost-file-list: permission denied","errorVerbose":"mkdir client/plugins/mattermost-file-list: permission denied\nunable to copy webapp bundle directory: mattermost-file-list\ngithub.com/mattermost/mattermost-server/plugin.(*Environment).UnpackWebappBundle\n\t/go/src/github.com/mattermost/mattermost-server/plugin/environment.go:383\ngithub.com/mattermost/mattermost-server/plugin.(*Environment).Activate\n\t/go/src/github.com/mattermost/mattermost-server/plugin/environment.go:239\ngithub.com/mattermost/mattermost-server/app.(*App).SyncPluginsActiveState\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:100\ngithub.com/mattermost/mattermost-server/app.(*App).InitPlugins\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:133\ngithub.com/mattermost/mattermost-server/app.(*Server).RunOldAppInitalization.func6\n\t/go/src/github.com/mattermost/mattermost-server/app/server_app_adapters.go:148\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners.func1\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:35\nsync.(*Map).Range\n\t/usr/local/go/src/sync/map.go:333\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:33\ngithub.com/mattermost/mattermost-server/config.(*commonStore).set\n\t/go/src/github.com/mattermost/mattermost-server/config/common.go:90\ngithub.com/mattermost/mattermost-server/config.(*FileStore).Set\n\t/go/src/github.com/mattermost/mattermost-server/config/file.go:107\ngithub.com/mattermost/mattermost-server/app.(*App).SaveConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:378\ngithub.com/mattermost/mattermost-server/app.(*App).EnablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:333\ngithub.com/mattermost/mattermost-server/api4.enablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/api4/plugin.go:298\ngithub.com/mattermost/mattermost-server/web.Handler.ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/web/handlers.go:146\ngithub.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler/gzip.go:336\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux/mux.go:212\ngithub.com/mattermost/mattermost-server/app.(*RateLimiter).RateLimitHandler.func1\n\t/go/src/github.com/mattermost/mattermost-server/app/ratelimit.go:108\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1878\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337\nunable to generate webapp bundle: mattermost-file-list\ngithub.com/mattermost/mattermost-server/plugin.(*Environment).Activate\n\t/go/src/github.com/mattermost/mattermost-server/plugin/environment.go:241\ngithub.com/mattermost/mattermost-server/app.(*App).SyncPluginsActiveState\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:100\ngithub.com/mattermost/mattermost-server/app.(*App).InitPlugins\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:133\ngithub.com/mattermost/mattermost-server/app.(*Server).RunOldAppInitalization.func6\n\t/go/src/github.com/mattermost/mattermost-server/app/server_app_adapters.go:148\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners.func1\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:35\nsync.(*Map).Range\n\t/usr/local/go/src/sync/map.go:333\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:33\ngithub.com/mattermost/mattermost-server/config.(*commonStore).set\n\t/go/src/github.com/mattermost/mattermost-server/config/common.go:90\ngithub.com/mattermost/mattermost-server/config.(*FileStore).Set\n\t/go/src/github.com/mattermost/mattermost-server/config/file.go:107\ngithub.com/mattermost/mattermost-server/app.(*App).SaveConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:378\ngithub.com/mattermost/mattermost-server/app.(*App).EnablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:333\ngithub.com/mattermost/mattermost-server/api4.enablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/api4/plugin.go:298\ngithub.com/mattermost/mattermost-server/web.Handler.ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/web/handlers.go:146\ngithub.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler/gzip.go:336\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux/mux.go:212\ngithub.com/mattermost/mattermost-server/app.(*RateLimiter).RateLimitHandler.func1\n\t/go/src/github.com/mattermost/mattermost-server/app/ratelimit.go:108\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1878\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337"}

Incompatible with Zoom plugin

Upon activating both File List and Zoom plugins, the icons for both disappear from the top bar, rendering both plugins unusable.

Plugin failed to ServeHTTP

Hi,

When I press the File-List-button I get this message:

image

The output of the server logs:
{"level":"error","ts":1593006612.0640645,"caller":"plugin/client_rpc_generated.go:67","msg":"RPC call OnConfigurationChange to plugin failed.","plugin_id":"mattermost-file-list","error":"connection is shut down"} {"level":"error","ts":1593006635.8659816,"caller":"plugin/client_rpc.go:322","msg":"Plugin failed to ServeHTTP, RPC call failed","plugin_id":"mattermost-file-list","error":"connection is shut down"} {"level":"error","ts":1593006640.8668642,"caller":"plugin/client_rpc.go:274","msg":"Plugin failed to ServeHTTP, muxBroker couldn't accept connection","plugin_id":"mattermost-file-list","serve_http_stream_id":16,"error":"timeout waiting for accept"} {"level":"info","ts":1593006640.867067,"caller":"http/server.go:1102","msg":"http: multiple response.WriteHeader calls","source":"httpserver"} {"level":"error","ts":1593006640.8671255,"caller":"plugin/client_rpc.go:295","msg":"Plugin failed to ServeHTTP, muxBroker couldn't Accept request body connection","plugin_id":"mattermost-file-list","error":"timeout waiting for accept"} {"level":"info","ts":1593006640.8671818,"caller":"http/server.go:1102","msg":"http: multiple response.WriteHeader calls","source":"httpserver"} {"level":"error","ts":1593006641.2190182,"caller":"plugin/client_rpc.go:322","msg":"Plugin failed to ServeHTTP, RPC call failed","plugin_id":"mattermost-file-list","error":"connection is shut down"} {"level":"error","ts":1593006641.2201598,"caller":"plugin/client_rpc.go:322","msg":"Plugin failed to ServeHTTP, RPC call failed","plugin_id":"mattermost-file-list","error":"connection is shut down"} {"level":"error","ts":1593006641.2205913,"caller":"plugin/client_rpc.go:322","msg":"Plugin failed to ServeHTTP, RPC call failed","plugin_id":"mattermost-file-list","error":"connection is shut down"} {"level":"error","ts":1593006646.2200549,"caller":"plugin/client_rpc.go:295","msg":"Plugin failed to ServeHTTP, muxBroker couldn't Accept request body connection","plugin_id":"mattermost-file-list","error":"timeout waiting for accept"} {"level":"info","ts":1593006646.2210839,"caller":"http/server.go:1102","msg":"http: multiple response.WriteHeader calls","source":"httpserver"} {"level":"error","ts":1593006646.2205927,"caller":"plugin/client_rpc.go:274","msg":"Plugin failed to ServeHTTP, muxBroker couldn't accept connection","plugin_id":"mattermost-file-list","serve_http_stream_id":20,"error":"timeout waiting for accept"} {"level":"info","ts":1593006646.2211275,"caller":"http/server.go:1102","msg":"http: multiple response.WriteHeader calls","source":"httpserver"} {"level":"error","ts":1593006646.2206497,"caller":"plugin/client_rpc.go:295","msg":"Plugin failed to ServeHTTP, muxBroker couldn't Accept request body connection","plugin_id":"mattermost-file-list","error":"timeout waiting for accept"} {"level":"info","ts":1593006646.2211494,"caller":"http/server.go:1102","msg":"http: multiple response.WriteHeader calls","source":"httpserver"} {"level":"error","ts":1593006646.22068,"caller":"plugin/client_rpc.go:274","msg":"Plugin failed to ServeHTTP, muxBroker couldn't accept connection","plugin_id":"mattermost-file-list","serve_http_stream_id":18,"error":"timeout waiting for accept"} {"level":"info","ts":1593006646.2211716,"caller":"http/server.go:1102","msg":"http: multiple response.WriteHeader calls","source":"httpserver"} {"level":"error","ts":1593006646.2210171,"caller":"plugin/client_rpc.go:274","msg":"Plugin failed to ServeHTTP, muxBroker couldn't accept connection","plugin_id":"mattermost-file-list","serve_http_stream_id":22,"error":"timeout waiting for accept"} {"level":"info","ts":1593006646.2211938,"caller":"http/server.go:1102","msg":"http: multiple response.WriteHeader calls","source":"httpserver"} {"level":"error","ts":1593006646.2210467,"caller":"plugin/client_rpc.go:295","msg":"Plugin failed to ServeHTTP, muxBroker couldn't Accept request body connection","plugin_id":"mattermost-file-list","error":"timeout waiting for accept"} {"level":"info","ts":1593006646.2212145,"caller":"http/server.go:1102","msg":"http: multiple response.WriteHeader calls","source":"httpserver"}
`

GitLab Mattermost runs as service on our GitLab server. The files are stored locally.

Tried older versions - same issues

Plugin breaks email notification "Go To Post"

Hi

When the plugin is active our users are getting just a grey screen when they click in the email notification to the button "Go To Post".

Chrome tells me:

main.1f50dbdc1d13a6abe0e4.js:197 TypeError: Cannot read property 'display_name' of undefined
    at Function.mapToProps (/static/plugins/mattermost-file-list/mattermost-file-list_22df5bd2ad49aed4_bundle.js:7)
    at a (main.1f50dbdc1d13a6abe0e4.js:175)
    at Function.a.mapToProps (main.1f50dbdc1d13a6abe0e4.js:175)
    at a (main.1f50dbdc1d13a6abe0e4.js:175)
    at main.1f50dbdc1d13a6abe0e4.js:175
    at Object.run (main.1f50dbdc1d13a6abe0e4.js:175)
    at s.c.initSelector (main.1f50dbdc1d13a6abe0e4.js:175)
    at new s (main.1f50dbdc1d13a6abe0e4.js:175)
    at co (main.1f50dbdc1d13a6abe0e4.js:197)
    at Er (main.1f50dbdc1d13a6abe0e4.js:197)
Mi @ main.1f50dbdc1d13a6abe0e4.js:197
/static/plugins/mattermost-file-list/mattermost-file-list_22df5bd2ad49aed4_bundle.js:7 Uncaught (in promise) TypeError: Cannot read property 'display_name' of undefined
    at Function.mapToProps (/static/plugins/mattermost-file-list/mattermost-file-list_22df5bd2ad49aed4_bundle.js:7)
    at a (main.1f50dbdc1d13a6abe0e4.js:175)
    at Function.a.mapToProps (main.1f50dbdc1d13a6abe0e4.js:175)
    at a (main.1f50dbdc1d13a6abe0e4.js:175)
    at main.1f50dbdc1d13a6abe0e4.js:175
    at Object.run (main.1f50dbdc1d13a6abe0e4.js:175)
    at s.c.initSelector (main.1f50dbdc1d13a6abe0e4.js:175)
    at new s (main.1f50dbdc1d13a6abe0e4.js:175)
    at co (main.1f50dbdc1d13a6abe0e4.js:197)
    at Er (main.1f50dbdc1d13a6abe0e4.js:197)

As soon as i deactivate the plugin the page is loading.

Best regards

File list plugin & s3

Hi,

I'm facing an issue when configuring mattermost with s3, file list cannot able to use in this case. It works fine on local storage.

File list plugin can't able to list or search file. It said: "An error occurred in the File List plugin. Please notify the administrator. A detailed error message was added to the server log."

Screenshot-2

I checked the server logs, there is no error was written down. The configured access key has full permission on s3 service. How can I debug for this?

Thank you for making an awesome plugin. Thanks for your help.

Best

Error plugin activations

Hi. I tried to activate plugin from web console. It is logs:
{"level":"error","ts":1568972186.934706,"caller":"mlog/log.go:173","msg":"Unable to activate plugin","plugin_id":"mattermost-file-list","error":"unable to start plugin: mattermost-file-list: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","errorVerbose":"Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.\nunable to start plugin: mattermost-file-list\ngithub.com/mattermost/mattermost-server/plugin.(*Environment).Activate\n\t/go/src/github.com/mattermost/mattermost-server/plugin/environment.go:259\ngithub.com/mattermost/mattermost-server/app.(*App).SyncPluginsActiveState\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:96\ngithub.com/mattermost/mattermost-server/app.(*App).InitPlugins\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:127\ngithub.com/mattermost/mattermost-server/app.(*Server).RunOldAppInitalization.func6\n\t/go/src/github.com/mattermost/mattermost-server/app/server_app_adapters.go:147\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners.func1\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:35\nsync.(*Map).Range\n\t/usr/local/go/src/sync/map.go:333\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:33\ngithub.com/mattermost/mattermost-server/config.(*commonStore).set\n\t/go/src/github.com/mattermost/mattermost-server/config/common.go:90\ngithub.com/mattermost/mattermost-server/config.(*FileStore).Set\n\t/go/src/github.com/mattermost/mattermost-server/config/file.go:97\ngithub.com/mattermost/mattermost-server/app.(*App).SaveConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:378\ngithub.com/mattermost/mattermost-server/app.(*App).EnablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:320\ngithub.com/mattermost/mattermost-server/api4.enablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/api4/plugin.go:252\ngithub.com/mattermost/mattermost-server/web.Handler.ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/web/handlers.go:144\ngithub.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler/gzip.go:336\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\ngithub.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux/mux.go:212\ngithub.com/mattermost/mattermost-server/app.(*RateLimiter).RateLimitHandler.func1\n\t/go/src/github.com/mattermost/mattermost-server/app/ratelimit.go:109\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1878\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337"}

MM v5.12+ - search doesn't work when on PostgresSQL

Will be fixed today.
Backend error:

{"Severity":"ERROR","Code":"42P18","Message":"could not determine data type of parameter $2","Detail":"","Hint":"","Position":"","InternalPosition":"","InternalQuery":"","Where":"","Schema":"","Table":"","Column":"","DataTypeName":"","Constraint":"","File":"postgres.c","Line":"1348","Routine":"exec_parse_message"}

Plugin relevance

This was a really great plugin, and though there is a native file list, it does not allow file deletion. I think this is a design choice by Mattermost because they want people to buy enterprise then use the data retention policy. That leaves community users no way to easily delete files, for security or disk space. Maybe you no longer have any interest, but this plugin could be relevant again if it was reduced to providing a delete button and its back-end handler.

Missing word-break inside file list columns

When I open the modal on my server, I see something like this:
files
This rendering issue could be mitigated by allowing word-breaks not only for the links inside the filename column but also inside other columns:

table.file-list-table td {
    word-break: break-word;
}

resulting in a better layout:
files2

Unable to activate plugin

Hey,
I am using GitLab and integrated Mattermost. The activation of the plugin fails, because it can not locate the config.json file.
I tried to put the file on following locations:
/var/opt/mattermost/config.json,/opt/mattermost/config.json, /etc/mattermost/config.json and /mattermost/config.json
But none of them works.

Here is the error:

"Unable to activate plugin","plugin_id":"mattermost-file-list","error":"unable to start plugin: mattermost-file-list: failed to find config file config.json","errorVerbose":"failed to find config file config.json\nunable to start plugin: mattermost-file-list\ngithub.com/mattermost/mattermost-server/plugin.(*Environment).Activate\n\t/go/src/github.com/mattermost/mattermost-server/plugin/environment.go:230\ngithub.com/mattermost/mattermost-server/app.(*App).SyncPluginsActiveState\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:95\ngithub.com/mattermost/mattermost-server/app.(*App).InitPlugins.func2\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:172\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners.func1\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:35\nsync.(*Map).Range\n\t/usr/local/go/src/sync/map.go:333\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:33\ngithub.com/mattermost/mattermost-server/config.(*commonStore).set\n\t/go/src/github.com/mattermost/mattermost-server/config/common.go:82\ngithub.com/mattermost/mattermost-server/config.(*FileStore).Set\n\t/go/src/github.com/mattermost/mattermost-server/config/file.go:97\ngithub.com/mattermost/mattermost-server/app.(*Server).UpdateConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:53\ngithub.com/mattermost/mattermost-server/app.(*App).UpdateConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:59\ngithub.com/mattermost/mattermost-server/app.(*App).EnablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:245\ngithub.com/mattermost/mattermost-server/api4.enablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/api4/plugin.go:191\ngithub.com/mattermost/mattermost-server/web.Handler.ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/web/handlers.go:144\ngithub.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/NYTimes/gziphandler/gzip.go:336\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\ngithub.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux/mux.go:212\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1878\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337"}

I am pointless right now, maybe you can help me out?
Thanks

Localization (i18n) support

Hey there,

I'd think this plugin would really benefit from supporting multiple display languages. Right now, from what I've seen the text itself is hardcoded.
I already noticed that there is an existing i18n folder in this repository, but doesn't seem to be used yet.

What are the current plans for adding i18n support? I'd be happy to contribute a German translation, especially since we are using it in our fresh Mattermost instance. :)

Case sensitive search even though case insensitive option is enabled.

Hey just stumbled across this plugin and started testing around with it.

What strikes me as odd is that when i search for a file it is case sensitive, even though I've read that it should be case insensitive from the get go and I even tried enabling the case insensitive option and i don't get a checkbox for it.

See here:

image

image

image

Any idea if I am doing anything wrong or did a bug crawl in?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.