T
Twenty4mo ago
Daan

Uploaded images not displaying

I tried uploading images to my profile and workspace, the image upload works but when I refresh the image is not loading, a 403 error appears in the console. Version: 0.52.0 Error: {"statusCode":403,"message":"Forbidden resource","error":"Forbidden"}
16 Replies
ɃØĦɆᵾS
ɃØĦɆᵾS4mo ago
Hi, did you try updating to newest version? I believe it's solved on main
AR
AR4mo ago
@Daan How can I help you?
martmull
martmull4mo ago
Yes as @ɃØĦɆᵾS said we changed the way we sign file and image urls on newest version, but image upload should work on 0.52.0 @Daan is it loading properly after a page refresh?
Daan
DaanOP4mo ago
I've had this issue for a long time, from like version 0.20 After updating to the latest version 0.54 this issue still persists @martmull Also on refresh the image does not load
martmull
martmull4mo ago
new file signature feature it is not available on v0.54 will be on next release I suspect a CORS issue, can you send the browser console error?
Daan
DaanOP4mo ago
Ah okay
martmull
martmull4mo ago
yeah sorry i should tell you before you upgrade
Daan
DaanOP4mo ago
It is not a CORS issue, it is a server issue I think. The response is a 403
martmull
martmull4mo ago
can you send the request payload? (make sure to offuscate the token)
Daan
DaanOP4mo ago
The files are stored correctly in the bucket Request url: https://crm.exmaple.com/files/profile-picture/original/c3449466-803d-4899-b804-d84d446f8bb0.png?token=xxx Headers:
GET /files/profile-picture/original/c3449466-803d-4899-b804-d84d446f8bb0.png?token=xxx HTTP/3
Host: crm.example.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0
Accept: image/avif,image/jxl,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Sec-GPC: 1
Alt-Used: crm.example.com
Connection: keep-alive
Referer: https://crm.example.com/settings/profile
Cookie: xxxx
Sec-Fetch-Dest: image
Sec-Fetch-Mode: no-cors
Sec-Fetch-Site: same-origin
Priority: u=5, i
Pragma: no-cache
Cache-Control: no-cache
TE: trailers
GET /files/profile-picture/original/c3449466-803d-4899-b804-d84d446f8bb0.png?token=xxx HTTP/3
Host: crm.example.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0
Accept: image/avif,image/jxl,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Sec-GPC: 1
Alt-Used: crm.example.com
Connection: keep-alive
Referer: https://crm.example.com/settings/profile
Cookie: xxxx
Sec-Fetch-Dest: image
Sec-Fetch-Mode: no-cors
Sec-Fetch-Site: same-origin
Priority: u=5, i
Pragma: no-cache
Cache-Control: no-cache
TE: trailers
martmull
martmull4mo ago
I think I need to test the feature with docker, checking that this afternoon
Daan
DaanOP4mo ago
@martmull Have you been able to reproduce this issue?
martmull
martmull4mo ago
Not tried yet sorry I have created an issue to prioritize this @Daan sorry for the delay, i have just tested with the one-line-script docker install and image upload works well on version 0.54.6 can you try with this specific version ? Also can you check your app_token env var ?
Daan
DaanOP4mo ago
No problem! I do not have a app_token only app_secret, do you mean the app_secret? I am currently on that version I found the issue, the issue is with in cloudflare caching... I disabled cache for twenty and it works Thank you for you time
martmull
martmull4mo ago
Great to hear Did you figured out what's happening with the cloudfare cache? ah, maybe you just have to reset the cache indeed And maybe you can look your cloudfare caching settings to check it does not ignore query-string parameters Or just wait for next release so you will enjoy request parameter signature instead of query params ^^
Daan
DaanOP4mo ago
Yes I disabled caching for my twenty instance with a cache rule

Did you find this page helpful?