In order to upload files you have to have an active subscription for your user. Read the subscriptions page on instructions how to setup a subscription for yourself.
In your .env
file the environment variable PUBLIC_FILES_SERVER_URL
has to be set to a publicly accessible url. The reason for that is that the clients are accessing the Files Server directly instead of via Api Gateway. Remember that if you are hosting your self-hosted instance on an external server then localhost
is not the host that properly describes where the files server resides.
The default upload directory is located inside your working directory under uploads/
. Depending on the running OS, you might encounter write permissions to that folder by the application. In that case the following commands might help:
chmod -R 775 data
mkdir -p uploads
sudo chmod -R 755 uploads
sudo chown -R 1001.1001 uploads
If you would like to limit the file upload quota for your user then make sure to run the following query on your database:
INSERT INTO subscription_settings(uuid, name, value, created_at, updated_at, user_subscription_uuid) VALUES (UUID(), "FILE_UPLOAD_BYTES_LIMIT", 10737418240, FLOOR(UNIX_TIMESTAMP(NOW(6))*1000000), FLOOR(UNIX_TIMESTAMP(NOW(6))*1000000), (SELECT us.uuid FROM user_subscriptions us INNER JOIN users u ON us.user_uuid=u.uuid WHERE u.email="EMAIL@ADDR"));
Note that this is setting the limit to 10GB (10737418240 bytes) for user with email EMAIL@ADDR
When using CloudFlare in conjuction with Nginx you might encounter an issue about missing Accept-Ranges
header which is required for file downloading. As a fix please add this to your Nginx configuration:
proxy_cache off;