Mattermost Peer-to-Peer Forum

P2P File Sending


#1

Hello.
I have a question about the file send.
I am using mattermost at company, using our local server.
Sometimes, I send big file to other through mattermost.
But it works like below.

  • In my side, Uploading file to server.
  • In other side, downloading file from server.

When the file is small, there is no problem.
But if the file is big, it spends lots of time and lots of server storage.
Is there any method to send file as P2P in local network?
Please help me. Thank you.


#2

Hi @JinZhuXing,

What Mattermost server version are you using? What device and OS are you using? What browser are you on?


#3

Thanks for replying.
Mattermost server : v5.6.2 (Ubuntu 18.04 Server)
Mattermost client : v4.2.0 (Windows 10, Windows 8.1)
Browser : Chrome, Firefox, Edge
Not using Linux, MacOS, Android and iOS version at our company.
Thanks.


#4

Hi, @JinZhuXing

I would like to understand the question that you have here a little better. Since you mentioned the following:

When the file is small, there is no problem.
But if the file is big, it spends lots of time and lots of server storage.

  • Are you referring to the time taken to upload or download the file?
  • How much time and storage you are referring to?
  • When you mentioned that it takes a long time and server storage, can you give some example so I can test it on my end? File type and size? Is it more than 50MB?
  • How is the speed of your network like?
  • If you are referring to downloading, did you compare the speed of download outside of Mattermost itself via public link - Sharing Public Links?
  • Since you mentioned about P2P sharing within a local network, are you actually looking at other alternatives besides Mattermost to share the file?

Keep us posted. Thank you.


#5

Hi, @adanial
I means that file size is bigger than 1G. (such as Visual Studio 2017 installer file. (> 40G))
When I send large file through mattermost, it is very inconvenient.
Because our server have not enough space.
So that, we transfer large file and after receiving complete, we must delete that file from mattermost.
It is not convenient.
Our local network is 100Mbps.

When I use QQ messenger, it has Peer to Peer file send function.
When I send file to others, I can select file send option.
I can use <direct file send (P2P)> and also can use <offline file send (Upload and Download)>.

Please help me.
Thanks.


#6

Hello, @JinZhuXing

According to the Configuring Mattermost Server documentation:

  1. Files and images that users attach to their messages are not stored in the database. Instead, they are stored in a location that you specify. You can store the files on the local file system or in Amazon S3.
  2. Make sure that the location has enough free space. The amount of storage that’s required depends on the number of users and on the number and size of files that users attach to messages.

In this case, may I know what type of storage you have configured for your instance and the size of storage currently allocated? If your instance deals with a lot of big files, it would be best to allocate a bigger file store or else, you pretty much have to delete the file from Mattermost since it takes up a lot of space.

In terms of file sharing, I would think that QQ messenger works in a different way compared to Mattermost in terms of security (instant messaging versus enterprise self hosted chat solution), which might explain why there is no P2P file sharing by default.


#7

I don’t think that Mattermost should be used for such data transfer. Please keep in mind that the files are typically never deleted. Maybe you can install beside of Mattermost Nextcloud. Then you could share the files with Nextcloud and send the message with Mattermost.


#8

Hello, @adanial
So you means that Mattermost cannot support P2P file sharing because of security problem?


#9

Hello, @JinZhuXing

I won’t bluntly say that it cannot support P2P file sharing due to security issues, hence the statement “might explain” in my response earlier. Since Mattermost focuses primarily on enterprise communication, I don’t think large data transfer feature would fit as a requirement especially when uploaded files are kept in the server by default and not automatically purged after a specific period of time as @JtheBAB had mentioned.


#10

Thanks for kind reply.
I’ll find other P2P file sharing software and use it for our file sending.
Mattermost is a good software.
Thanks.
Thank you @adanial


#11

Hi, @JinZhuXing

You are most welcome. I will definitely share the compliment to the rest of the Mattermost team to make their day. Have a good one!


#12

Hi @adanial,

Can you please reconsider this? WebRTC file sharing like
https://www.sharedrop.io
https://www.webrtc-experiment.com/file-hangout/

is awesome!

From technical perspective this should be fairly trivial to support from within Mattermost.


#13

Thank you @langemeijer . Thank you very much.
I also think so.


#14

Hello, @langemeijer

Thank you for sharing the suggestions. I checked on both links and wanted to try them. However, I ran into some issues with sharedrop (file transfer failed) and the choose file was disabled for WebRTC group sharing :

Nevertheless, I would still consider a P2P file sharing feature as an extra add-on / integration for Mattermost as it adds extra value to allow big file transfers since the default file sharing works fine:

In this case, I would say an integration will be pretty awesome to have.