[DigitalPoint] App for Cloudflare®

[DigitalPoint] App for Cloudflare® 1.8.2

No permission to download
I'm also getting that error. He says to run it from the XF folder. IE: on my system it's under /home/nginx/domains/forum.mysite.com/public/src/XF. So I did cd /home/nginx/domains/forum.mysite.com/public/src/XF I also tried cd /home/nginx/domains/forum.mysite.com/public/src/.

It works with cd /home/nginx/domains/forum.mysite.com/public/, which is the folder with all the 40x.html and 50x.html files.

Code:
php cmd.php dp:migrate-data

If you have a lot of data being moved, this is not going to be the best option for migrating data. Flysystem (the abstracted file system that XenForo uses) does not have a mechanism for paging through files (all file info is stored in a single array). If you have too many files, this could cause memory issues for PHP (and you will be better off using third-party tools that don't rely on Flysystem).

+---------------------------+-------------------+-----------------------------------------------------+
| Location                  | From adapter      | To adapter                                          |
+---------------------------+-------------------+-----------------------------------------------------+
| data                      | XF\LocalFsAdapter | DigitalPoint\Cloudflare\League\Flysystem\Adapter\R2 |
| internal_data/attachments | XF\LocalFsAdapter | DigitalPoint\Cloudflare\League\Flysystem\Adapter\R2 |
+---------------------------+-------------------+-----------------------------------------------------+

Which location would you like to migrate?
  [data                     ] The public data directory (/data/*) where XenForo stores public data (for example avatars).
  [internal_data/attachments] The private directory (/internal_data/attachments/*) where attachments are stored.
 > data

Location: data
From: XF\LocalFsAdapter
To: DigitalPoint\Cloudflare\League\Flysystem\Adapter\R2
Memory used: 7.8 MB, allowed: ∞
Note: this process will not delete data from the source adapter (if you want to delete it later, you will need to do that on your own).
Are you certain you want to migrate 22 files (666,987 total bytes)?

 22/22 [============================] 100%  5 secs  120 KB/s
Looks like you have to run it twice. Once for data and again for internal_data/attachments.

I switched to R2 a while back but I don't think I ever ran this command.
 
Last edited:
I am actually doing this right now too... I just typed "data" at that point. I'm pretty sure it's working correctly. I'll do it for "internal_data/attachments" when this is done.

Ah so you added R2/data and that was it?
 
I got an image good.svg storing in data/images/good.svg in my server which I used for making a node background, I refer it with background-image: url(data/images/good.svg); in extra.less.

I can see the image directly by https://www.mysite.com/data/images/good.svg .

Then for testing purpose, I just tried to move the image to R2 with the command php cmd.php dp:migrate-data and it's a success. Deleted the original image.

Then change the line in extra.less to background-image: url(https://data/mysite.com/images/good.svg) . The image doesn't show up, just showing a blank space. If I go to https://data/mysite.com/images/good.svg directly by the browser, I can see an SVG file, but not the picture, just the SVG codes.

So what's that mean? Cloudflare R2 won't render the SVG to an image? It's ok if I put all background images in local server as it won't expand to a very large number. I just want to know the reasons. Thanks.
 
You don’t need to do anything beyond picking what set of files. If you pick data from the menu, that’s all you need to do.DigitalPoint\Cloudflare\League\Flysystem\Adapter\R2

I got it done with my attachments but I'm having an issue with R2 data saying that the domain is used. I'm not really sure what to add there. The other two internal attachments and internal data point to the domain data.myforum url. What domain would I add for R2 data?

I'm having an issue with ozzys movies, tv and video game thread starters. Those images won't show now but in the bucket I see the file directories. Any ideas.? Thanks!
 
I got an image good.svg storing in data/images/good.svg in my server which I used for making a node background, I refer it with background-image: url(data/images/good.svg); in extra.less.

I can see the image directly by https://www.mysite.com/data/images/good.svg .

Then for testing purpose, I just tried to move the image to R2 with the command php cmd.php dp:migrate-data and it's a success. Deleted the original image.

Then change the line in extra.less to background-image: url(https://data/mysite.com/images/good.svg) . The image doesn't show up, just showing a blank space. If I go to https://data/mysite.com/images/good.svg directly by the browser, I can see an SVG file, but not the picture, just the SVG codes.

So what's that mean? Cloudflare R2 won't render the SVG to an image? It's ok if I put all background images in local server as it won't expand to a very large number. I just want to know the reasons. Thanks.
SVG is a little weird as far as content sniffers being able to correctly know what the file is because fundamentally it's actually a text file (specifically an XML file). See this post for info and what to do (Cloudflare Transform Rule):


I got it done with my attachments but I'm having an issue with R2 data saying that the domain is used. I'm not really sure what to add there. The other two internal attachments and internal data point to the domain data.myforum url. What domain would I add for R2 data?
It's impossible to point two different buckets to the same domain. You also shouldn't have a separate "internal attachments" bucket and an "internal data" bucket. You should have 1 public bucket (with the public domain assigned), which is your XenForo "data" folder. You should also have 1 internal data bucket for anything that exists in XenForo's "internal_data" folder (which does not have a public domain assigned). Maybe the problem here is you somehow assigned a public domain to internal data bucket(s)? Not sure when or how you did that, but I don't think there's a situation where the addon would do that for you (that I can think of anyway). Did you add public domains manually in the Cloudflare dashboard, or maybe initially create a bucket as a data bucket (where a public domain is assigned), but then later decide to use that as an internal data bucket?

I'm having an issue with ozzys movies, tv and video game thread starters. Those images won't show now but in the bucket I see the file directories. Any ideas.? Thanks!
Sorry, I don't know anything about that addon. Shouldn't be too hard to figure out though... If the URLs are correct, maybe they are SVG images (see above)?
 
SVG is a little weird as far as content sniffers being able to correctly know what the file is because fundamentally it's actually a text file (specifically an XML file). See this post for info and what to do (Cloudflare Transform Rule):

The screen is a bit different than yours and it doesn't work. Still showing me the codes.

1701674634708.webp
 
The screen is a bit different than yours and it doesn't work. Still showing me the codes.

View attachment 294847
Don’t know where you are at without seeing the full page, but that doesn’t look like a response header transform rule to me. Is that maybe a redirect rule? When creating it, above where you name it, if it says something other than, “Create new HTTP Response Header Modification Rule”, you are in the wrong area.
 
SVG is a little weird as far as content sniffers being able to correctly know what the file is because fundamentally it's actually a text file (specifically an XML file). See this post for info and what to do (Cloudflare Transform Rule):



It's impossible to point two different buckets to the same domain. You also shouldn't have a separate "internal attachments" bucket and an "internal data" bucket. You should have 1 public bucket (with the public domain assigned), which is your XenForo "data" folder. You should also have 1 internal data bucket for anything that exists in XenForo's "internal_data" folder (which does not have a public domain assigned). Maybe the problem here is you somehow assigned a public domain to internal data bucket(s)? Not sure when or how you did that, but I don't think there's a situation where the addon would do that for you (that I can think of anyway). Did you add public domains manually in the Cloudflare dashboard, or maybe initially create a bucket as a data bucket (where a public domain is assigned), but then later decide to use that as an internal data bucket?


Sorry, I don't know anything about that addon. Shouldn't be too hard to figure out though... If the URLs are correct, maybe they are SVG images (see above)?

Ok so I created a folder in my public html and used that as the subdomain for my data and activated r2 data. Now i'm missing images on my forum and I'm assuming it's because I have to transfer the images to cloudflare using the cmd? If so would you happen to know what exactly to write? I know for the other two attachments and xfmg I pasted php emd.php dp:migrate-data. Do I use the same code for data? If so how does it know where to transfer the images to? Thanms
 
Not exactly following you. If it's outside of your XenForo data or internal_data folder, the tool won't do anything for you. It's a XenForo-specific tool to transfer stuff in your data or internal_data folder, anything else is outside the scope of what it can do (it only deals with default XenForo things).
 
Not exactly following you. If it's outside of your XenForo data or internal_data folder, the tool won't do anything for you. It's a XenForo-specific tool to transfer stuff in your data or internal_data folder, anything else is outside the scope of what it can do (it only deals with default XenForo things).
I can't use data.forum.com on my r2 data because it says the url is already being used. It's being used by internal attachments and xfmg. For data was under the impression that i had to create a new folder where the xf directory is and use that as the domain. Was I wrong? Again thank you for your help and patience.

IMG_0679.webp
 
As I mentioned previously, I'm not sure how you ended up with a public domain on an internal data bucket, but normally you wouldn't have one. If you manually added it for some reason in the Cloudflare dashboard, then I assume you had a reason to do so and whatever that reason is, is fine with me (although putting all your private/internal data on a public URL probably isn't the best practice from a security standpoint because you've effectively put all the contents of a folder that is supposed to be private [internal_data] and exposed it/made it available to anyone that wants it online)... Either way, you need to pick a different public domain for a different bucket. You can't have the same public domain on different buckets.

If you don't have a specific reason to have a public domain on your internal data bucket, I'd remove it from that bucket via Cloudflare dashboard.
 
As I mentioned previously, I'm not sure how you ended up with a public domain on an internal data bucket, but normally you wouldn't have one. If you manually added it for some reason in the Cloudflare dashboard, then I assume you had a reason to do so and whatever that reason is, is fine with me (although putting all your private/internal data on a public URL probably isn't the best practice from a security standpoint)... Either way, you need to pick a different public domain for a different bucket. You can't have the same public domain on different buckets.

If you don't have a specific reason to have a public domain on your internal data bucket, I'd remove it from that bucket via Cloudflare dashboard.

What would I add instead considering it won't let me add data.url? Thanks
 
What would I add instead considering it won't let me add data.url? Thanks
Anything you want... peepeepoopoo.yourdomain.com or if you can't think of anything, you can make it digitalpoint.yourdomain.com [COLOR=hsl(var(--xf-editorFocusColor))]if you want. 😂
 
Anything you want... peepeepoopoo.yourdomain.com or if you can't think of anything, you can make it digitalpoint.yourdomain.com [COLOR=hsl(var(--xf-editorFocusColor))]if you want. 😂

Hahaha what I meant was do I create a folder in my directory and if so where would I do that? public html/folder? Or do I create the folder data/folder? Thanks!
 
I really don't know what you are trying to do exactly. If you can point me to whatever you are seeing that is saying you need to create a folder that matches a subdomain (or any folder at all for that matter), maybe I can better understand what exactly you are trying to do and why you are trying to do whatever that is.

If you are trying to use R2 strictly with this addon, maybe you are reading something unrelated to this addon and making things more complicated for yourself than they need to be? Anything you are reading that isn't part of this addon, you can ignore.
 
Top Bottom