Skip to content

Commit

Permalink
Fix regression that dropped custom public/uploads path (render-exampl…
Browse files Browse the repository at this point in the history
…es#18)

Strapi v4 lost the ability to override the public directory. v4.1.6
re-added that functionality but in a different way than how it worked in
Strapi pre v4. This PR[1] moves the configuration of the location of the
public directory to config/server.js. We want to override the default
only in production so that the public folder contents can be saved on a
persistent disk.

[1]: strapi/strapi#12534 Although this PR was
merged on Mar 25, the change wasn't included in a release until 4.1.6,
which was released on Mar 30.
  • Loading branch information
crcastle authored Apr 4, 2022
1 parent 1a108ed commit 7318a3f
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 135 deletions.
3 changes: 3 additions & 0 deletions config/env/production/server.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = ({ env }) => ({
url: env("RENDER_EXTERNAL_URL"),
dirs: {
public: "/data/public"
},
});
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
},
"devDependencies": {},
"dependencies": {
"@strapi/plugin-i18n": "4.1.5",
"@strapi/strapi": "4.1.5",
"@strapi/plugin-users-permissions": "4.1.5",
"@strapi/plugin-i18n": "4.1.7",
"@strapi/strapi": "4.1.7",
"@strapi/plugin-users-permissions": "4.1.7",
"sqlite3": "^5.0.2"
},
"author": {
Expand Down
Loading

0 comments on commit 7318a3f

Please sign in to comment.