XF 2.4 Chunked uploads

HYS 24 Chunked Uploads.webp
Welcome back to our Have you seen...? series for XenForo 2.4! The code reviews are coming in thick and fast as we complete our planned features so there should be plenty to show you over the coming weeks.

Part of our process for this and previous releases has involved looking at the amazing pool of developer talent that we have in this community and considering how we can work with those developers to bring those features to the core.

And that's the focus of this time where we'll be taking a look at the Chunked Uploads add-on by @JulianD which, starting with XenForo 2.4, will become a core feature.

But first...​

We have decided to accelerate our plans to modernise the minimum version of PHP that is supported by XenForo. While we had originally planned to increase the minimum version to PHP 7.4, in recent weeks we have decided that it might be time to leave PHP 7.x behind.

As such, XenForo 2.4 will require PHP 8.0.2 as a minimum. Around 90% of our customers running XF 2.3 are already running PHP 8.0 and above. If you're still on XF 2.2, you can get ahead of the game right now as we have supported PHP 8.0 for quite a number of years!

With PHP 8.0, as well as being able to finally use all of the new syntax stuff that we're usually deprived of, it also allows us to modernise some of the third party dependencies we use.

Chunkier uploads​


"Chunked uploads" is the process of splitting uploaded files into much smaller chunks which are then re-assembled on the server. The main reason you might want to do this is if you have very strict file upload limits imposed by your host, you want to upload much larger files, or you proxy your site behind services such as Cloudflare.

Cloudflare for example imposes a 100MB upload limit, regardless of what your server configuration may be. In some cases the default max upload size in PHP is as little as 2MB. Or, in some cases, your server config might be reasonable but you might occasionally need to upload larger files than allowed.

In all of these examples, you could pay Cloudflare money, or faff around with server configs or, alternatively, you can just enabled "Chunked uploads":

1738859856069.webp


As soon as you enable chunked uploads, the theoretical maximum file size you will be able to upload will now be a massive 128GB! We can do that by splitting a file into much smaller chunks. You can see from the "Chunk size" option, this determines the maximum size of each chunk that is uploaded. In the example above, my server limits the maximum file size to 2,048 KB so I should set the chunk size to a value below that. We can also customise the number of simultaneous chunks that can be uploaded at once. This is potentially useful for performance, theoretically allowing larger files with a large number of chunks to be uploaded more quickly.

And once enabled, as you can see, the normal "Maximum file size" options are now capable of being increased to a much larger size than previously allowed:

1738860234987.webp


We'd like to extend our thanks again to @JulianD for allowing us to not have to reinvent the wheel and giving us access to his code for the development of this feature.

For our next Have you seen...? we might have another feature or two from a prominent developer here or we might be rounding off some existing features with some new goodies. Which one? I'll let you know when I'm writing the HYS :)
 
Innovative!

One recommendation I have is that when replacing add-ons, going through which features are supported and are not when comparing. Helps to understand if this replaces that addon or is just the same name.
 
One recommendation I have is that when replacing add-ons, going through which features are supported and are not when comparing. Helps to understand if this replaces that addon or is just the same name.
This entirely replaces the current add-on.
 
For our next Have you seen...? we might have another feature or two from a prominent developer here or we might be rounding off some existing features with some new goodies. Which one?

My guess is this is a trick question. I think we'll be rounding off some existing features with some new goodies from another feature or two from a prominent developer here.
 
Awesome! Would this also allow resuming interrupted uploads?

Also, any word on the new editor and switching off Markdown?
 
Back
Top Bottom