P
Postiz•4mo 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•4mo ago
@HeinzSchrot do you want to use local uploading instead?
HeinzSchrot
HeinzSchrot•4mo ago
or minio, whatever is working 🙂
Nevo David
Nevo David•4mo ago
So just out the new docs We have changed how this things work
HeinzSchrot
HeinzSchrot•4mo 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•4mo ago
UPLOAD_DIRECTORY="you local path like /users/documents/uploads" NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY="/uploads"
HeinzSchrot
HeinzSchrot•4mo ago
outside of the container
Nevo David
Nevo David•4mo ago
And STORAGE_PROVIDER="local" Are you going to use it for production usage?
HeinzSchrot
HeinzSchrot•4mo 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•4mo ago
Did you set CORs policies on your Cloudflare bucket?
HeinzSchrot
HeinzSchrot•4mo ago
yes - went back to local, forgot to add the volume. now it works 🙂 thanks!
xcons
xcons•4mo 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•4mo 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•4mo ago
What is the path saved in the db for the file?
xcons
xcons•4mo 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•4mo ago
@HeinzSchrot did you solve your problem?
HeinzSchrot
HeinzSchrot•4mo ago
Hi @Nevo David I was not able to look into it. Gonna do tomorrow. Thanks
HeinzSchrot
HeinzSchrot•4mo ago
Hi , this is the db:
No description
HeinzSchrot
HeinzSchrot•4mo ago
this is the log
Nevo David
Nevo David•4mo ago
if you open the link, you can access it?
HeinzSchrot
HeinzSchrot•4mo ago
Yes
xcons
xcons•4mo ago
and are you still using cloudflare for images, not local storage?

Did you find this page helpful?