【问题标题】:Strapi photos disappearedStrapi 照片消失了
【发布时间】:2021-06-03 04:51:28
【问题描述】:

我使用 Heroku 进行部署,使用 mongoDB Atlas 作为数据库,使用 Strapi 作为 Headless CMS。 Heroku 已经在与爱好 Dyno 合作。昨天我在我的数据库中添加了一些数据和一些图片,它工作正常,但是 24 小时后我的 Strapi 没有显示图片,我检查了我的数据库,似乎我还有带照片的文档。那么如果你之前遇到过这个问题,问题出在哪里,你是怎么解决的呢?

【问题讨论】:

    标签: mongodb heroku strapi


    【解决方案1】:

    Heroku 将在每次重启后删除存储在服务器上的所有文件。

    检查文档:

    https://strapi.io/documentation/developer-docs/latest/getting-started/troubleshooting.html#why-is-my-app-s-database-and-uploads-resetting-on-paas

    对于文件上传,您需要使用第三方提供商之一,例如 Cloudinary 或 AWS S3。

    对于 AWS S3,您可以使用提供商检查文档:

    https://strapi.io/documentation/developer-docs/latest/development/plugins/upload.html#using-a-provider

    更多提供者可以在 npm 上搜索:

    https://www.npmjs.com/search?q=strapi-provider-upload-&ranking=popularity

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-04
      • 2022-08-23
      • 2022-11-01
      • 2016-07-15
      • 1970-01-01
      相关资源
      最近更新 更多