-
While running my play application in DEV mode,Users can upload images and uploaded images shown in web, but in PRODUCTION mode users can upload images but their images not shown in the web. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I depends on how you build/deploy/run your app. (For example, I use sbt stage: https://github.com/Squoss/Squawg/blob/main/Dockerfile) For example, in DEV the /public/images as explained in https://www.playframework.com/documentation/2.8.x/Anatomy is the only instance. In PRODUCTION there might be several in your case, one below /public because you still upload to there and one below /target. I would look into that if you haven't done so already. And as a general rule, I would use a third-party storage for user uploads if that's possible in your case, https://www.clever-cloud.com/cellar-s3-hosting/ for instance. I hope this helps! |
Beta Was this translation helpful? Give feedback.
I depends on how you build/deploy/run your app. (For example, I use sbt stage: https://github.com/Squoss/Squawg/blob/main/Dockerfile)
For example, in DEV the /public/images as explained in https://www.playframework.com/documentation/2.8.x/Anatomy is the only instance. In PRODUCTION there might be several in your case, one below /public because you still upload to there and one below /target. I would look into that if you haven't done so already.
And as a general rule, I would use a third-party storage for user uploads if that's possible in your case, https://www.clever-cloud.com/cellar-s3-hosting/ for instance.
I hope this helps!