Skip to content
English
  • There are no suggestions because the search field is empty.

PDF Preview Issues

Original Question or Issue:

PDF previews are not working.


Environment:

  • Product - FileCloud Server
  • Version - 23.241
  • Platform - Any

Steps to Reproduce:

 


Error or Log Message:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://my-fc-instance.com/xxx (Reason: CORS header 'Access-Control-Allow-Origin' missing). Status Code: 403.


Defect or Enhancement Number:

 


Cause:

This is caused when using an S3 bucket for your files without a CORS policy.
A CORS policy is required to ensure your resources can be accessed from a third-party application.


Resolution or Workaround:

To configure the CORS policy:

  • Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.
  • In the Bucket name list, choose the name of the bucket that you want to create a bucket policy for.
  • Choose Permissions, and then choose CORS configuration.
  • In the CORS configuration editor text box, type or copy and paste the following CORS configuration:

    [
        {
            "AllowedHeaders": [
                "*"
            ],
            "AllowedMethods": [
                "GET",
                "PUT",
                "POST",
                "DELETE"
            ],
            "AllowedOrigins": [
                "https://my-fc-instance.com"
            ],
            "ExposeHeaders": [
                "ETag"
            ],
            "MaxAgeSeconds": 3000
        }
    ]

Notes: