[在此处输入图像描述][1]将文件上传到我的私有Azure blob存储后,我上传的资源的预览未显示在Strapi Jmeter 板中。我正在使用我的存储访问密钥向Strapi提供权限。我能够通过Strapi Jmeter 板上传和删除文件,但预览和下载不可用。任何快速的帮助将不胜感激。为此挣扎了几天。
下面是我在middleware.js中使用的Strapi代码
name: "strapi::security",
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
"connect-src": ["'self'", "https:"],
"img-src": [
"'self'",
"data:",
"blob:",
"dl.airtable.com",
"https://market-assets.strapi.io",
"https://*.blob.core.windows.net",
"https://*.blob.core.windows.net/my_bucket_name",
],
"media-src": [
"'self'",
"data:",
"blob:",
"dl.airtable.com",
"https://*.blob.core.windows.net",
"https://*.blob.core.windows.net/my_bucket_name",
],
upgradeInsecureRequests: null,
},
},
},
},```
Below is the configuration where I am giving permission access to Strapi for Azure
```upload: {
config: {
provider: 'strapi-provider-upload-azure-storage',
providerOptions: {
account: env('STORAGE_ACCOUNT'),
accountKey: env('STORAGE_ACCOUNT_KEY'),
serviceBaseURL: env('STORAGE_URL'),
containerName: env('STORAGE_CONTAINER_NAME'),
defaultPath: 'assets',
maxConcurrent: 100,
expiresIn:3600,
}
}
},```
[Below is the link where you can find the image][1]
[1]: https://i.stack.imgur.com/xhZrN.png
1条答案
按热度按时间v440hwme1#
MSDoc为Slapi。
代码:
输出: