powered by Jive Software

Http file upload plugin, storage where?

Hello,
using the http file upload plugin, I am wondering where the files are stored when user is offline.
Is it the same storage as the messages, so in the database, as I have chosen ?
This would bear the question how to size the storage in Server Settings > Offline storage.
Or are the files stored differently ? Where ?

If someone could help me in this regards, I would appreciate.
Thank you.

files are not saved to offline storage, only the xmpp message are… the file itselfs are stored on memory of the server … you can define the path in system properties with variable “plugin.httpfileupload.fileRepo”
value should be the destination path
take care, if you are running a cluster, then this storage path should be accessable from all the nodes so the path should point to a shared storage…

Source, Line 62-79

Hi,
thank you for the info.
I looked through the system properties, but can’t find those entries. I am assuming that I have to add the one for the file location (line 63). The other properties are shown on line 56-60. Those could be added if one likes to change default settings.

Is my understanding correct ?
Don’t want to mess-up my system.

Yes you have to add the properties otherwhise the files are stored in systems temp directory

So add the the value and restart openfire… i you have trouble with it you could simply remove the property and restart again…

Of course you should check whether the openfire process is able to access the storage directory… (daemon write and read permissions…)

thank you so much. That worked as expected, except one thing:
I added plugin.httpfileupload.maxFileSize and set the value to 5MB. That was not recognized, as I could upload a file with size of 7.0MB.

I am assuming that I wrote the value in a wrong way, what would be the correct way so that it is recognized ?

Thank you.

plugin.httpfileupload.maxFileSize is a long var…
You have to set the max. In bytes
5mb = 5 x 1024 x 1024 = 5242880 bytes…
So set 5242880 as value

1 Like

Thank you for the prompt help. :upside_down_face:
Will do so and all should be as expected.