[DigitalPoint] App for Cloudflare®

[DigitalPoint] App for Cloudflare® 1.8.2

No permission to download
OK, deleting the SVGs and re-uploading them seems to fix it. I am still wondering why this is happening.

That being said, if you want to set the HTTP response Content-Type based on the object key/URL, you can do that if you want with Cloudflare's transform rules. See this post:
Thanks for the reference! I’ll look into it.
 
OK, deleting the SVGs and re-uploading them seems to fix it. I am still wondering why this is happening.


Thanks for the reference! I’ll look into it.
It depends on how you are uploading them. If you are uploading them manually in your browser, some browsers will attempt to set the content-type and set that as part of the upload request. It's not reliable though and it's not supported by all browsers. If the upload request sets the content-type, Cloudflare will make note of that and serve it as such. If the upload request doesn't manually set the content-type, then Cloudflare will attempt to figure it out on their end based on the content of the file. If it can't figure it out, it will just be blank like you saw. It's probably better to use the transform rule I linked to earlier because then you aren't reliant on a particular browser setting it or manually uploading.
 
It depends on how you are uploading them. If you are uploading them manually in your browser, some browsers will attempt to set the content-type and set that as part of the upload request. It's not reliable though and it's not supported by all browsers. If the upload request sets the content-type, Cloudflare will make note of that and serve it as such.
I created the buckets via the add-on and then uploaded the contents of the data folder via the browser. I’m still investigating…
 
I created the buckets via the add-on and then uploaded the contents of the data folder via the browser. I’m still investigating…
Like I said, some browsers will try to do it for you, others won't. You can't rely on the browser to actually set it (or set it correctly). SVG files are a unique case because most things will just see the contents as a text or XML file rather than an SVG file.
 
That being said, if you want to work around it, you need to set the HTTP response Content-Type based on the object key/URL. You can do that if you want with Cloudflare's transform rules. See this post:

After setting up the transform rule, Cloudflare does update the content type for the SVGs that are uploaded via the browser; however, it fails to do so for the SVGs that are uploaded via XF ACP.
 
The transform rules aren't going to know how something was uploaded. Are you sure the transform rule just isn't working and the ones from the browser upload have the content type set?
 
So, it looks like their drag-and-drop feature is buggy. If I drag and drop a mixture of folders and files, then the object type of SVGs does not get defined. If it is just the files or just the folders, then the object type gets defined.
 
So, it looks like their drag-and-drop feature is buggy. If I drag and drop a mixture of folders and files, then the object type of SVGs does not get defined. If it is just the files or just the folders, then the object type gets defined.
Like I said… it’s going to be dependent on your browser. And it will never be reliable, so… don’t rely on the browser setting content type properly.
 
Regardless of the mime-type being set or not being set in Cloudflare, I did not manage to get Cloudflare to serve SVGs; the browser would still show broken image placeholders instead of the actual images.
 
Unfortunately, not anymore. After a day of unsuccessful testing, I concluded we’re not yet ready for a move to R2, but will be revisiting this feature sometime in the future.

Be that as it may, many thanks for your attention to the issue and overall presence!
FWIW, if the Content-Type header isn't being set in the HTTP response, I'd triple check the transform rule. The HTTP request trace tool (in XF Admin -> Cloudflare) would be useful as well. It simulates a request and tells you what rules are being applied as it passes through Cloudflare's network.
 
Hi!
Thanks for this great addon!
I just installed version "1.7.0.1" a few hours ago, Then tried to upload the data and attachments to the R2 manually (using rclone) and it was successful.
Then enabled the R2 storage features in the addon settings. I have now two issues:

1. After the activation of the r2 storage , new attachments are working fine, but I can not find them on R2 :) , they are not on the server itself so they are being uploaded in R2 but not visible in the right folder. Does it take some time?! (images below)

2023-08-09_19-16.webp2023-08-09_19-17.webp2023-08-09_19-10.webp



2. Old attachment images (thumbs in data folder) are loading fine but the old attachment itself (the .data file) is not loading, although the file is already in R2 storage. (error below happens)

1691601614903.webp

What have I done wrong?
 
Check the info about rclone uploading. More specifically, the part where the file structure needs to match (see this post). From the looks of your screenshots, you don't have "attachments" in the path on the R2 side (newly uploaded things will have it which is why those work, but old ones don't... they don't have the correct path).
 
Thanks for the quick reply,
Check the info about rclone uploading. More specifically, the part where the file structure needs to match (see this post). From the looks of your screenshots, you don't have "attachments" in the path on the R2 side (newly uploaded things will have it which is why those work, but old ones don't... they don't have the correct path).
Thanks for the tip! it seems the "internal_data/attachments" bucket is missing a attachment folder and all the data should be moved to that folder.
Is there any way to do this in R2 itself and do not re-upload the files?
 
Thanks for the quick reply,

Thanks for the tip! it seems the "internal_data/attachments" bucket is missing a attachment folder and all the data should be moved to that folder.
Is there any way to do this in R2 itself and do not re-upload the files?
No, S3 (and in turn R2 since it uses a S3 compatible API) doesn't have a mechanism to change object keys. Maybe there's a utility to do it (or maybe rclone can do it, I'm not sure since I haven't tried), but underneath it all the only way a utility could do it would be to download the object, re-upload it with a new path/key and then delete the original. So finding a utility to do it would actually take longer than re-uploading with the correct path (re-uploading just requires uploading, where a rename utility would require not only uploading everything again but also downloading it all as well).

Even though the filename/path looks like folders and stuff since you can uses slashes, internally it's just a unique key for the object. There isn't a concept of folders (although some interfaces try to fake it to look like folders... including Cloudflare's dashboard). It would be nice if there was simply a "change key" command for the API, but there isn't one.
 
Did anyone had a similar issue using rclone?
1692173454399.png
The command looks OK:
Code:
rclone copy /home/user/public_html/test.txt user:test2/ --verbose --transfers 10
Also if I want to create a new API, I get the following error:
1692173492009.png

Could be my account limited? It doesn't make any sense
 
Top Bottom