Can't upload media assets

petulantpenguinTRIAL

a year ago

When i go to upload media items, it fails.
I have Cloudinary name, api key and secret added.
But i still get an upload failure when adding images in the media library.

View Deploy

16 Replies

petulantpenguinTRIAL

a year ago

it looks like the strapi project crashes and restarts everytime i try to add an image


petulantpenguinTRIAL

a year ago

the deploy link above is not the successful deploy + failed image upload. it is a previous failed deploy


a year ago

Only admins can use that Deploy link, Please attach your deployment logs using this https://bookmarklets.up.railway.app/log-downloader/


petulantpenguinTRIAL

a year ago

[2024-03-25 15:11:16.190] http: GET /upload/configuration (68 ms) 200
[2024-03-25 15:11:16.302] http: GET /upload/folders?page=1&sort=updatedAt:DESC&pageSize=10&filters[$and][0][parent][id][$null]=true&pagination[pageSize]=-1 (28 ms) 200
[2024-03-25 15:11:16.333] http: GET /upload/files?page=1&sort=createdAt:DESC&pageSize=10&filters[$and][0][folderPath][$eq]=/&folder= (34 ms) 200
[2024-03-25 15:11:16.468] http: GET /upload/folders?page=1&sort=createdAt:DESC&pageSize=10&filters[$and][0][parent][id][$null]=true&pagination[pageSize]=-1 (25 ms) 200
Killed
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn run v1.22.22
$ strapi start
Project information
┌────────────────────┬──────────────────────────────────────────────────┐
│ Time │ Mon Mar 25 2024 15:11:30 GMT+0000 (Coordinated … │
│ Launched in │ 2006 ms │
│ Environment │ production │
│ Process PID │ 35 │
│ Version │ 4.17.1 (node v20.9.0) │
│ Edition │ Community │
│ Database │ postgres │
└────────────────────┴──────────────────────────────────────────────────┘
Actions available
Welcome back!
To manage your project 🚀, go to the administration panel at:
[https://strapi-production-8b77.up.railway.app](https://strapi-production-8b77.up.railway.app)/admin
To access the server ⚡️, go to:
https://strapi-production-8b77.up.railway.app
[2024-03-25 15:36:53.919] http: GET index.html (35 ms) 200
[2024-03-25 15:36:54.048] http: GET /assets/images/logo_login.png (14 ms) 200
[2024-03-25 15:36:54.133] http: GET /robots.txt?1711381013966 (3 ms) 200
[2024-03-25 15:36:54.256] http: GET /favicon.ico (1 ms) 200


petulantpenguinTRIAL

a year ago

@brody
thanks for that link!


petulantpenguinTRIAL

a year ago

i just ran it in development mode on local and was able to upload an image.


petulantpenguinTRIAL

a year ago

OK! looking at cloudinary, it uploads the images.
but i am not able to see them in the strapi media library.


a year ago

Are you using the strapi template provided by our community member Milo, that template comes with strapi properly configured.


petulantpenguinTRIAL

a year ago

i did use the strapi template, forked the strapi project so i could add different object types, and connected the strapi-side of the strapi templated project to my own forked branch.

does this make sense?


a year ago

Did you fork the strapi template, or strapi's own github repo?


petulantpenguinTRIAL

a year ago

forked the strapi template


a year ago

I know for a fact the strapi template works wonderfully, so there is a misconfiguration somewhere after the fork, can you double check you have all your service variables in order?


petulantpenguinTRIAL

a year ago

honestly, i don't really know what is going on.

it looks like i am now able to upload images. but, i can't run the develop anymore…..


petulantpenguinTRIAL

a year ago

Well, i think i figured out what i wasn't understanding! thanks for your help. i think this was a serious lack of understanding of railway on my part. BUT, your commentary above helped me work out my gaps. I really appreciate it!


a year ago

Glad to hear that, but I think it would be good to note that you should never run strapi in development mode on Railway, I have seen countless users lose their data that way on account of the ephemeral storage, only ever run strapi in production when on Railway.


petulantpenguinTRIAL

a year ago

right! i wan't understanding the railway paradigm
i run it in dev mode on my local box and make the necessary changes to the objects, etc. i use railway up to deploy those to railway which is running in PROD mode.
now that the types have been updated in prod mode, i can add data there and everything.

correct me if i am wrong, but that makes the code base for strapi ephemeral itself since i clone that railway strapi repo, connect it to the project, make the changes, and then run railway up
--that means I dont need to keep the code around on my own computer, right?
The changes I made, after being deployed will be retained if i clone the railway repo again because connecting to the project with railway link makes the necessary updates locally?