P
Postizβ€’3mo ago
Support

Ticket: R2 Bucket Upload Issue: Credentials Updated, Still No Media

@HeinzSchrot Just created a ticket
Question: Hi, I'm experiencing the same issue, that media does not get uploade to r2 bucket. this is my env. the bucket ist empty :/ Thanks! # https://docs.postiz.com/configuration/r2 CLOUDFLARE_ACCOUNT_ID: "sdfsdfsdfdsfsd" CLOUDFLARE_ACCESS_KEY: "sdfsfsdfsdf" CLOUDFLARE_SECRET_ACCESS_KEY: "sdfdsfsdfdsfsdf" CLOUDFLARE_BUCKETNAME: "postiz" CLOUDFLARE_BUCKET_URL: "https://sdfsdfsdfdsfsd.eu.r2.cloudflarestorage.com/" CLOUDFLARE_REGION: "EEUR"
Attempted: issued new credentials.
Working On: getting the bucket to work
Take it from here @Mod πŸ”₯
Postiz Documentation
R2 Configuration – Postiz Docs
How to use R2
21 Replies
Nevo David
Nevo Davidβ€’3mo ago
@HeinzSchrot do you want to use local uploading instead?
HeinzSchrot
HeinzSchrotβ€’3mo ago
or minio, whatever is working πŸ™‚
Nevo David
Nevo Davidβ€’3mo ago
So just out the new docs We have changed how this things work
HeinzSchrot
HeinzSchrotβ€’3mo ago
so this: Your upload directory path if you host your files locally, otherwise Cloudflare will be used. #UPLOAD_DIRECTORY="" Your upload directory path if you host your files locally, otherwise Cloudflare will be used. #NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY=""
Nevo David
Nevo Davidβ€’3mo ago
UPLOAD_DIRECTORY="you local path like /users/documents/uploads" NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY="/uploads"
HeinzSchrot
HeinzSchrotβ€’3mo ago
outside of the container
Nevo David
Nevo Davidβ€’3mo ago
And STORAGE_PROVIDER="local" Are you going to use it for production usage?
HeinzSchrot
HeinzSchrotβ€’3mo ago
jes, but were just a small company after composing up again, die postiz container is still looking for cloudflare | β¨― upstream image response failed for https://dsasd.eu.r2.cloudflarestorage.com/LIKRfgsZUi.jpeg 400 ok, I tried cloudflare again. the images are getting uploaded now. But requesting the images throw a error 400
xcons
xconsβ€’3mo ago
Did you set CORs policies on your Cloudflare bucket?
HeinzSchrot
HeinzSchrotβ€’3mo ago
yes - went back to local, forgot to add the volume. now it works πŸ™‚ thanks!
xcons
xconsβ€’3mo ago
Awesome 😎 Yeah I was gonna say in a container, its just /uploads Cool, I recommend volumes instead of Cloudflare Less to go wrong! Do you need help with anything else?
HeinzSchrot
HeinzSchrotβ€’3mo ago
I still do get those errors: } postiz | β¨― The requested resource isn't a valid image for /icons/platforms/undefined.png received text/html; charset=utf-8 postiz | β¨― The requested resource isn't a valid image for /icons/platforms/undefined.png received text/html; charset=utf-8 postiz | Email sender information not found in environment variables postiz | β¨― TypeError: fetch failed postiz | at node:internal/deps/undici/undici:13178:13 postiz | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) postiz | at async fetchExternalImage (/app/node_modules/next/dist/server/image-optimizer.js:565:17) postiz | at async NextNodeServer.imageOptimizer (/app/node_modules/next/dist/server/next-server.js:650:48) postiz | at async cacheEntry.imageResponseCache.get.incrementalCache (/app/node_modules/next/dist/server/next-server.js:182:65) postiz | at async /app/node_modules/next/dist/server/response-cache/index.js:90:36 postiz | at async /app/node_modules/next/dist/lib/batcher.js:45:32 { postiz | [cause]: ConnectTimeoutError: Connect Timeout Error postiz | at onConnectTimeout (node:internal/deps/undici/undici:2331:28) postiz | at node:internal/deps/undici/undici:2283:50 postiz | at Immediate._onImmediate (node:internal/deps/undici/undici:2315:13) postiz | at process.processImmediate (node:internal/timers:483:21) postiz | at process.callbackTrampoline (node:internal/async_hooks:130:17) { postiz | code: 'UND_ERR_CONNECT_TIMEOUT' postiz | } but posting to instagram works like intended. This is postiz frontend only i guess
Nevo David
Nevo Davidβ€’3mo ago
What is the path saved in the db for the file?
xcons
xconsβ€’3mo ago
Hey @HeinzSchrot , let us know when you're around, we're happy to help Next time, would you mind posting code blocks with 3x ` marks, that way Discord formats as code
Nevo David
Nevo Davidβ€’3mo ago
@HeinzSchrot did you solve your problem?
HeinzSchrot
HeinzSchrotβ€’3mo ago
Hi @Nevo David I was not able to look into it. Gonna do tomorrow. Thanks
HeinzSchrot
HeinzSchrotβ€’3mo ago
Hi , this is the db:
No description
HeinzSchrot
HeinzSchrotβ€’3mo ago
this is the log
Nevo David
Nevo Davidβ€’3mo ago
if you open the link, you can access it?
HeinzSchrot
HeinzSchrotβ€’2mo ago
Yes
xcons
xconsβ€’2mo ago
and are you still using cloudflare for images, not local storage?

Did you find this page helpful?