Is there any way to upload larger than 100mb when using CF?

sanhpv

Active member
Registered
Joined
Mar 7, 2022
Messages
28
Points
13

Reputation:

I found out there is a chunks addon that will help me with this. But is there any other way, for example adding a subdomain for the attachment and disabling its proxy? Can anyone guide me?
 

Toasty

SVIP Member
S.V.I.P Member
Registered
Joined
Apr 12, 2021
Messages
16
Points
13

Reputation:

To implement the tus.io protocol into your XenForo installation using Nginx, you'll need to configure the tus server and set up Nginx to handle tus requests. Here's a general outline of the process:

1. Install tusd (tus.io server):​

2. Configure tusd:​

  • Create a directory to store uploads:
    bash
    Copy code
    mkdir -p /var/www/tus/uploads
  • Run the tusd server:
    bash
    Copy code
    tusd -dir /var/www/tus/uploads -behind-proxy

3. Configure Nginx:​

  • Add a location block in your Nginx configuration for tus uploads:
    nginx
    Copy code
    server {
    listen 80;
    server_name yourdomain.com;

    location /tus/ {
    proxy_pass http://127.0.0.1:1080;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    # Optional: increase max body size for large uploads
    client_max_body_size 0;
    proxy_connect_timeout 600;
    proxy_send_timeout 600;
    proxy_read_timeout 600;
    }

    # Other XenForo configurations...
    }
  • Ensure that the proxy_pass directive points to the tusd server's address. If tusd is running locally, use http://127.0.0.1:1080.

4. Integrate with XenForo:​

  • Modify your XenForo installation to handle tus.io upload requests. You may need to create a custom XenForo addon or modify existing upload handling scripts to support resumable uploads using the tus protocol.

5. Test the Setup:​

  • Upload a large file using a tus.io client to ensure everything is working correctly. Check the Nginx and tusd logs for any errors.
This setup will allow you to handle large, resumable file uploads through tus.io in your XenForo installation using Nginx.
 

sanhpv

Active member
Registered
Joined
Mar 7, 2022
Messages
28
Points
13

Reputation:

To implement the tus.io protocol into your XenForo installation using Nginx, you'll need to configure the tus server and set up Nginx to handle tus requests. Here's a general outline of the process:

1. Install tusd (tus.io server):​

2. Configure tusd:​

  • Create a directory to store uploads:
    bash
    Copy code
    mkdir -p /var/www/tus/uploads
  • Run the tusd server:
    bash
    Copy code
    tusd -dir /var/www/tus/uploads -behind-proxy

3. Configure Nginx:​

  • Add a location block in your Nginx configuration for tus uploads:
    nginx
    Copy code
    server {
    listen 80;
    server_name yourdomain.com;

    location /tus/ {
    proxy_pass http://127.0.0.1:1080;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    # Optional: increase max body size for large uploads
    client_max_body_size 0;
    proxy_connect_timeout 600;
    proxy_send_timeout 600;
    proxy_read_timeout 600;
    }

    # Other XenForo configurations...
    }
  • Ensure that the proxy_pass directive points to the tusd server's address. If tusd is running locally, use http://127.0.0.1:1080.

4. Integrate with XenForo:​

  • Modify your XenForo installation to handle tus.io upload requests. You may need to create a custom XenForo addon or modify existing upload handling scripts to support resumable uploads using the tus protocol.

5. Test the Setup:​

  • Upload a large file using a tus.io client to ensure everything is working correctly. Check the Nginx and tusd logs for any errors.
This setup will allow you to handle large, resumable file uploads through tus.io in your XenForo installation using Nginx.
ToastyCó cách nào khác đơn giản hơn không?
 

Toasty

SVIP Member
S.V.I.P Member
Registered
Joined
Apr 12, 2021
Messages
16
Points
13

Reputation:

Đơn giản nhất có thể (theo như tôi biết).
 

Toasty

SVIP Member
S.V.I.P Member
Registered
Joined
Apr 12, 2021
Messages
16
Points
13

Reputation:

You can add the subdomain in your nginx site config and disable the proxy for that sub domain. But, if you are using HSTS then that will not help you.. you are also defeating the purpose of Cloudflare by showing your IP to the server.
 

Toasty

SVIP Member
S.V.I.P Member
Registered
Joined
Apr 12, 2021
Messages
16
Points
13

Reputation:

IMG_0498.jpg



This is what you want A+ across the board on your SSL. Having anything less than an “A” will hurt your google rankings.
 

Toasty

SVIP Member
S.V.I.P Member
Registered
Joined
Apr 12, 2021
Messages
16
Points
13

Reputation:

It’s easy to fix, go read the results of your site on that website I just shared and it will tell you what you are doing wrong.
 

Toasty

SVIP Member
S.V.I.P Member
Registered
Joined
Apr 12, 2021
Messages
16
Points
13

Reputation:

A “B” rating won’t hurt you too bad. Just means there is room for improvement. You can also use it to gauge your security pitfalls.
 

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
758
Points
153

Reputation:

I found out there is a chunks addon that will help me with this. But is there any other way, for example adding a subdomain for the attachment and disabling its proxy? Can anyone guide me?
sanhpvWhy not just use chunks addon? It works perfectly fine.
 

sanhpv

Active member
Registered
Joined
Mar 7, 2022
Messages
28
Points
13

Reputation:

Splicho

Emudevs.gg Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
758
Points
153

Reputation:

because it has an upload limit of 100 seconds
sanhpvCan't find anything in the addon that is related to a upload limitation, specifically for 100 seconds.

What you mean is probably the limitation on the CloudFlare end. Cloudflare has a timeout limitation of 100 seconds.

This means that if the final upload process takes more than 100 seconds, including rebuilding the attachment from the file chunks and sending it to XenForo internal storage, S3 or Spaces, the process will timeout and you will get an error.


In other words: That issue is on cloudflare, not on the addon or xenforo itself. So whatever you gonna use, it will timeout after 100 seconds.
 
Top