Chunked Uploads - XF2

Chunked Uploads - XF2 [Paid] 1.0.2

No permission to buy ($20.00)
Hello Julian,

In the next months I'm willing to open a 'YouTube' kind of competition on my XF with XenForo Media Manager, but my hosting company doesn't have necessary memory space to supply the demand. I have a dedicated hosting, but the space is the problem.

So, I'm thinking in using your services, add-on and stuff to make this work.

My initial plans are limiting the videos uploads to maximum 15 minutes with a proper file size limit, without 4K support, maybe only HD or FullHD. I just want to offer a service for my users to upload their videos, with scalable space (not Amazon please, is the most expensive. Digital Ocean Spaces is better option?) and proper playback to visitors using XenForo Media Manager.

So, before i contract your services, what do you recommend for my situation? Do you have some kind of expected pricing if i contract you to configure all this things? Your add-on + Digital Ocean Spaces + Configuration and estimate monthly costs?

Thank you and i hope we can do business together.
 
Hello Julian,

In the next months I'm willing to open a 'YouTube' kind of competition on my XF with XenForo Media Manager, but my hosting company doesn't have necessary memory space to supply the demand. I have a dedicated hosting, but the space is the problem.

So, I'm thinking in using your services, add-on and stuff to make this work.

My initial plans are limiting the videos uploads to maximum 15 minutes with a proper file size limit, without 4K support, maybe only HD or FullHD. I just want to offer a service for my users to upload their videos, with scalable space (not Amazon please, is the most expensive. Digital Ocean Spaces is better option?) and proper playback to visitors using XenForo Media Manager.

So, before i contract your services, what do you recommend for my situation? Do you have some kind of expected pricing if i contract you to configure all this things? Your add-on + Digital Ocean Spaces + Configuration and estimate monthly costs?

Thank you and i hope we can do business together.
Hello @deslocotoco

That is a great use for the Chunked Uploads addon. My only concern would be the video transcoding. I would recommend you to run some test uploading different videos to the XFMG and if you and/or your users don't have any problem playing the videos (test it with videos uploaded from android and played in an iPhone and vice versa), then the solution would work exactly as you mentioned it except for the 15 minutes limit that you mention. I myself don't have a XFMG license so I can't corroborate this but I think the only limit permission is based on the size of the file, not the duration of the video.

The pricing would be pretty much standard:

Chunked uploads addon + Digital Ocena Spaces (250GB per $5/month) + any extra bandwidth for serving videos. If you want me to set it up for you, then you have to add that cost on top of everything else.

I usually recommend my customers to get a video CDN on top of your server such as Swarmify. The advantage is that you don't need to worry about bandwidth costs (except from the initial bandwidth to serve the video to Swarmify) and they provide you with a custom video player and video transcoding that will enable iPhone users to playback videos without issues. Swarmify prices starts at $29/month per 50k video views but as you might already know, it's not necessary.
 
I usually recommend my customers to get a video CDN on top of your server such as Swarmify. The advantage is that you don't need to worry about bandwidth costs (except from the initial bandwidth to serve the video to Swarmify) and they provide you with a custom video player and video transcoding that will enable iPhone users to playback videos without issues. Swarmify prices starts at $29/month per 50k video views but as you might already know, it's not necessary.

Thanks for the very quickly reply Julian.

I really liked the Swarmify solution, because is around my initial plans to provide this kind of video support and 50k views for this price is very acceptable for my situation.

I really think that I can manage some file size limits, no problems here.

If I choose Swarmify, and your services, do you think is going to be compatible with XFMG and configuring/make all this work together?

The costs are going to be crowd funded because here in my country the demand are very high for this services (people are very tired and angry about YouTube, you probably know why).
 
If I choose Swarmify, and your services, do you think is going to be compatible with XFMG and configuring/make all this work together?

Yes, XFMG will be able to use the Chunked Uploads addon to enhance the video uploads and Swarmify will have no problem integrating with your site since it's a simple javascript library similar to Google Analytics or any other javascript include.
 
Yes, XFMG will be able to use the Chunked Uploads addon to enhance the video uploads and Swarmify will have no problem integrating with your site since it's a simple javascript library similar to Google Analytics or any other javascript include.

So, let's do this.

I'm going to start the crowd funding campaign in the next months and i come back to you when it's finished.

Thank you very much for your attention.
 
Mr. Julian,

If i use Swarmify as a CDN, as you recommended, can we avoid the timeout error from CloudFlare or i still be linked to then?

The timeouts errors cannot happen (as my market research shows me that), it will drive my content creators away. Anyway to avoid that?

If that's the problem, i can change CloudFlare to another CDN. I hope anything free will do the trick.

BTW, Swarmify is my choice for videos, without a doubt. Your recommendations about that and the price is good to me.
 
Mr. Julian,

If i use Swarmify as a CDN, as you recommended, can we avoid the timeout error from CloudFlare or i still be linked to then?

The timeouts errors cannot happen (as my market research shows me that), it will drive my content creators away. Anyway to avoid that?

If that's the problem, i can change CloudFlare to another CDN. I hope anything free will do the trick.

BTW, Swarmify is my choice for videos, without a doubt. Your recommendations about that and the price is good to me.
You may get timeouts if the time that takes your server to rebuild the uploaded files from the chunks and upload it to Spaces or S3 takes more than 100 seconds.

That might depends of several factors and the file size is one of them . So basically this means that even with this addon it is possible to get timeout errors if you're using Cloudflare. Now as I said, this is a timeout imposed by cloudflare and there's nothing you can do about it except from limiting the maximum upload file setting in your forum.

My recommendation is to play with the settings (beging in your desired max file upload setting and start going down from there) and leave it when you don't get the timeout errors, if you ever get any errors at all.
 
Question about the uploaded files, the chunks will be placed into the internal_data\chunked_uploads\temp folder and will be deleted after file has been rebuild. The new rebuild file will be placed into the internal_data\chunked_uploads folder and as well after saving the post in the attachments folder. Why will the file not be deleted from the internal_data\chunked_uploads folder ?

Would it be also possible to use the chunk mechanism for drag'n'drop into a post message ?
 
Last edited:
Question about the uploaded files, the chunks will be placed into the internal_data\chunked_uploads folder and will be deleted after file has been rebuild. The new rebuild file will be placed into the internal_data folder and as well after saving the post in the attachments folder. Why will the file not be deleted from the internal_data folder ?

Chunked pieces will be placed in the internal_data\chunked_uploads temporal directory. After a few hours/days (depending on your forum traffic) those temporal files will be deleted. When a file has been completely uploaded and rebuilt from the chunks, this file is then handed to the XenForo Attachment Controller where it will be processed and moved to the appropiate directory (wether the internal_data/attachment or a remote bucker such as AWS S3) and deleted from the internal_data\chunked_uploads directory

Would it be also possible to use the chunk mechanism for drag'n'drop into a post message ?
Unfortunately this is a XenForo limitation which in some cases it uses the default upload mechanisim without using the XenForo Attachment System used in the Attach files button.
 
Interested on this, is this done via separate addon?
Thanks for the awesome addon.
That is correct. Swarmify is a third-party service and although this addon doesn't support it, I can send you the integration addon if that's something you'd be interested in or even install it for you. Please open a conversation with me if you have any other questions. I'm more than happy to help you.
 
  • Like
Reactions: rdn
Not sure which addons fault.

PHP:
Server error log
ErrorException: [E_WARNING] Undefined variable $profilePost src/addons/UW/FCS/Attachment/Comment.php:112
Generated by: Unknown account May 27, 2021 at 3:23 PM

Stack trace
#0 src/addons/UW/FCS/Attachment/Comment.php(112): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/nginx/dom...', 112)
#1 src/addons/UW/FCS/Attachment/Comment.php(29): UW\FCS\Attachment\Comment->getProfilePostFromContext(Array)
#2 src/XF/Pub/Controller/Attachment.php(56): UW\FCS\Attachment\Comment->canManageAttachments(Array, NULL)
#3 src/addons/ChunkedUploads/XF/Pub/Controller/Attachment.php(48): XF\Pub\Controller\Attachment->actionUpload()
#4 src/XF/Mvc/Dispatcher.php(350): ChunkedUploads\XF\Pub\Controller\Attachment->actionUpload(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Attachment', 'Upload', Object(XF\Mvc\RouteMatch), Object(ChunkedUploads\XF\Pub\Controller\Attachment), NULL)
#6 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ChunkedUploads\XF\Pub\Controller\Attachment), NULL)
#7 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
#9 src/XF.php(488): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}

Request state
array(4) {
  ["url"] => string(108) "/attachments/upload?type=post_comment&context[post_id]=3872396&hash=c4185a61a45572e714e6cd1cc4f2f4fa"
  ["referrer"] => bool(false)
  ["_GET"] => array(4) {
    ["/attachments/upload"] => string(0) ""
    ["type"] => string(12) "post_comment"
    ["amp;context"] => array(1) {
      ["post_id"] => string(7) "3872396"
    }
    ["amp;hash"] => string(32) "c4185a61a45572e714e6cd1cc4f2f4fa"
  }
  ["_POST"] => array(0) {
  }
}
 
Not sure which addons fault.

PHP:
Server error log
ErrorException: [E_WARNING] Undefined variable $profilePost src/addons/UW/FCS/Attachment/Comment.php:112
Generated by: Unknown account May 27, 2021 at 3:23 PM

Stack trace
#0 src/addons/UW/FCS/Attachment/Comment.php(112): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/nginx/dom...', 112)
#1 src/addons/UW/FCS/Attachment/Comment.php(29): UW\FCS\Attachment\Comment->getProfilePostFromContext(Array)
#2 src/XF/Pub/Controller/Attachment.php(56): UW\FCS\Attachment\Comment->canManageAttachments(Array, NULL)
#3 src/addons/ChunkedUploads/XF/Pub/Controller/Attachment.php(48): XF\Pub\Controller\Attachment->actionUpload()
#4 src/XF/Mvc/Dispatcher.php(350): ChunkedUploads\XF\Pub\Controller\Attachment->actionUpload(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Attachment', 'Upload', Object(XF\Mvc\RouteMatch), Object(ChunkedUploads\XF\Pub\Controller\Attachment), NULL)
#6 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ChunkedUploads\XF\Pub\Controller\Attachment), NULL)
#7 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
#9 src/XF.php(488): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}

Request state
array(4) {
  ["url"] => string(108) "/attachments/upload?type=post_comment&context[post_id]=3872396&hash=c4185a61a45572e714e6cd1cc4f2f4fa"
  ["referrer"] => bool(false)
  ["_GET"] => array(4) {
    ["/attachments/upload"] => string(0) ""
    ["type"] => string(12) "post_comment"
    ["amp;context"] => array(1) {
      ["post_id"] => string(7) "3872396"
    }
    ["amp;hash"] => string(32) "c4185a61a45572e714e6cd1cc4f2f4fa"
  }
  ["_POST"] => array(0) {
  }
}
If it's an error that happens all the time could you please disable the chunked uploads addon and test if the error goes away?
 
Top Bottom