Knowledge Base


Knowledge Base / XFilesharing Pro / Troubleshooting

Cloudflare R2 uploads not working

07/09/2025 02:59 PM
Question
I'm using XFileSharingPro v4.1 or a later version that has direct CDN uploads support. When I try to uploading, the progress stops at 0%. When this happens, I see the following error in my browser's developer console:

> Access to XMLHttpRequest at 'https://...' from origin 'https://mydomain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Answer

Install CORS policy in your bucket settings:

[
  {
    "AllowedOrigins": [
      "*"
    ],
    "AllowedMethods": [
      "GET",
      "PUT"
    ],
    "AllowedHeaders": [
      "*"
    ],
    "ExposeHeaders": [
      "ETag"
    ]
  }
]