【问题标题】:Summernote icons are not loading after upload static files to aws将静态文件上传到 aws 后,Summernote 图标未加载
【发布时间】:2021-10-04 21:32:13
【问题描述】:

我将我的静态文件上传到了 aws s3 存储桶。 font awesome css 文件未加载。而且在管理页面中也可以正常加载。但是summernote中的图标在管理页面中不起作用。管理页面的图片。控制台中的错误是 "The server respond with a status of 403 (Forbidden)" 提前帮助谢谢, 迪宁杜。

【问题讨论】:

    标签: python django amazon-s3 summernote


    【解决方案1】:

    我遇到了和你类似的问题。登录 AWS 控制台后转到 here

    在 CORN 设置中添加以下代码。

    <?xml version="1.0" encoding="UTF-8"?>
    <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>GET</AllowedMethod>
    </CORSRule>
    </CORSConfiguration>
    

    这对我有用。

    【讨论】:

    • 这行不通你还有其他选择吗
    • 你可以将这些添加到头文件&lt;link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css" rel="stylesheet"&gt; &lt;link href="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.1/summernote.css" rel="stylesheet"&gt;
    • @Jafoor 我将它添加到我的 index.html 但它不起作用。我认为因为它不是管理页面的 html 文件。所以你知道我怎样才能找到的 html 文件管理页面。
    • @Jafoor 你有这个 xml 代码的 json 格式吗。因为我认为它会起作用
    • [ { "AllowedHeaders": [ "Content-*", "Authorization" ], "AllowedMethods": [ "GET" ], "AllowedOrigins": [ "*" ], "ExposeHeaders": [], "MaxAgeSeconds": 3000 } ] 你可以用这个。对不起,代码形成。
    猜你喜欢
    • 2020-04-27
    • 2021-03-24
    • 2022-01-13
    • 2022-10-18
    • 2021-05-28
    • 1970-01-01
    • 2022-01-11
    • 2019-08-31
    • 2014-11-12
    相关资源
    最近更新 更多