New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images are uploaded to the server would eventually get deleted. #91
Comments
thanks for sharing the Cloudinary image upload feature. it is easy and straightforward. |
@basir no problems, sounds good looking forward to AWS S3 bucket... |
@Slakie Did the images show up in homepage, but didn't show up in single product page or when searching the product? |
@SuneelGiri I am sorry, I didn't quite get your question? |
@Slakie i faced issue similar to yours. But in my case the photos loaded in home screen, not in single product page, or after \category:id routes. I fixed this my hosting my images in cloud. |
Hi @Slakie . |
Hi @Firefly08,
It seems to me that the problem is that you are using you cloudinary api
credentials directly in the uploadRoutes.js like this:
cloud.config({
cloud_name: process.env.dtqprzuw6,
api_key: process.env.773679569836399,
api_secret: process.env.oGtIKOfIbuSj4IpbuZVIUzSLxSQT,
});
Do this instead:
cloud.config({
cloud_name: “dtqprzuw6”,
api_key: “773679569836399”,
api_secret: “oGtIKOfIbuSj4IpbuZVIUzSLxSQT”,
})
Let me know if it works for you…?
…On Wed, 18 Aug 2021 at 17:46, Firefly8 ***@***.***> wrote:
Hi @Slakie <https://github.com/Slakie> .
I know that the issue is closed but maybe you can help me. Please.
I had the same problem with the images... after a while, they are
disappearing from Heroku. So I followed your steps and now on my Heroku app
I have an error: *'Application error'* and on the local version I have *'Request
failed with status code 500'*.
My Heroku app: https://finalstore21.herokuapp.com/
My GitHub files: https://github.com/Firefly08/finalstore21
Can you help me, please?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#91 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOSB2MBVEWAURTLON2CBW5LT5OTRHANCNFSM4V46MXMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
@Slakie Quick question, have you ever done a options feature? |
Hi @Slakie, |
Hi @Firefly08,
To be able to use the initial way, you would need to consider changing the
hosting then, heroku using dynos, meaning after 30 mins of inactivity your
space provided by heroku would be cleaned out so that means any uploads
would be lost too. At your next activity heroku would always use the files
that were initially deployed. However I am not sure if heroku paid tier
would behave the same way…
…On Thu, 19 Aug 2021 at 00:28, Firefly8 ***@***.***> wrote:
Hi @Firefly08 <https://github.com/Firefly08>, It seems to me that the
problem is that you are using you cloudinary api credentials directly in
the uploadRoutes.js like this: cloud.config({ cloud_name:
process.env.dtqprzuw6, api_key: process.env.773679569836399, api_secret:
process.env.oGtIKOfIbuSj4IpbuZVIUzSLxSQT, }); Do this instead:
cloud.config({ cloud_name: “dtqprzuw6”, api_key: “773679569836399”,
api_secret: “oGtIKOfIbuSj4IpbuZVIUzSLxSQT”, }) Let me know if it works for
you…?
… <#m_1255754356285647161_>
On Wed, 18 Aug 2021 at 17:46, Firefly8 *@*.***> wrote: Hi @Slakie
<https://github.com/Slakie> https://github.com/Slakie . I know that the
issue is closed but maybe you can help me. Please. I had the same problem
with the images... after a while, they are disappearing from Heroku. So I
followed your steps and now on my Heroku app I have an error: *'Application
error'* and on the local version I have *'Request failed with status code
500'*. My Heroku app: https://finalstore21.herokuapp.com/ My GitHub
files: https://github.com/Firefly08/finalstore21 Can you help me, please?
— You are receiving this because you were mentioned. Reply to this email
directly, view it on GitHub <#91 (comment)
<#91 (comment)>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOSB2MBVEWAURTLON2CBW5LT5OTRHANCNFSM4V46MXMQ
. Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email
.
I changed the code, the site is working now, but the images are still not
showing (eg. /uploads/image-1629230531199.png).
I copied the link to the image from Cloudinary (eg.
https://res.cloudinary.com/dtqprzuw6/image/upload/v1629289807/iphone-12_y88cbx.jpg)
and this way is working. But I would like to use the normal upload not link
to the image from Cloudinary.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#91 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOSB2MHVHZIJVBELYQBFRITT5QCXJANCNFSM4V46MXMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Hi @talmax1124 , |
@Slakie not images. Like shirt size and something like that. |
@talmax1124 right, no I have not. |
Issue Link
Issue:
Files are uploaded to the app but then disappear or are deleted after a while.
Resolution from Heroku support:
The Heroku filesystem is ephemeral - that means that any changes to the filesystem whilst the dyno is running only last until that dyno is shut down or restarted. Each dyno boots with a clean copy of the filesystem from the most recent deploy. This is similar to how many container based systems, such as Docker, operate.
In addition, under normal operations dynos will restart every day in a process known as "Cycling".
These two facts mean that the filesystem on Heroku is not suitable for persistent storage of data. In cases where you need to store data we recommend using a database addon such as Postgres (for data) or a dedicated file storage service such as AWS S3 (for static files). If you don't want to set up an account with AWS to create an S3 bucket we also have addons here that handle storage and processing of static assets https://elements.heroku.com/addons
My resolution:
The text was updated successfully, but these errors were encountered: