mirror of
https://github.com/stoatchat/self-hosted.git
synced 2026-07-22 04:55:33 -04:00
bug: Autumn File Upload Issue Please Help me #108
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @YoussefRefaat1976 on GitHub (Jun 1, 2025).
What happened?
I have an issue while uploading a file,photo
only text works let me show you here my files:
Cadddyfile
`www.MyDOMAIN.com, MyDOMAIN.com {
tls MyEMAIL@example.com
}
`
Revolt.toml
[hosts] app = "https://www.MYDOMAIN.com" api = "https://www.MYDOMAIN.com/api" events = "wss://www.MYDOMAIN.com/ws" autumn = "https://www.MYDOMAIN.com/autumn" january = "https://www.MYDOMAIN.com/january"also I'm thinking if may be a problem with the private_key, Public key!
but...
LET ME SHOW YOU THE CONSOLE WHEN I TRY TO UPLOAD A FILE:
`GET
https://www.MYDOMAIN.com/
[HTTP/2 304 236ms]
GET
wss://www.MYDOMAIN.com/ws
GET
https://www.MYDOMAIN.com/assets/main.1468d6bd.js
[HTTP/2 200 0ms]
GET
https://www.MYDOMAIN.com/assets/vendor.53ae3162.js
[HTTP/2 200 0ms]
XHRGET
https://www.MYDOMAIN.com/api/release
[HTTP/2 404 318ms]
GET
https://www.MYDOMAIN.com/assets/call_join.584596d3.mp3
[HTTP/2 206 0ms]
GET
https://www.MYDOMAIN.com/assets/message.1da7350f.mp3
[HTTP/2 206 0ms]
GET
https://www.MYDOMAIN.com/assets/call_leave.73de5878.mp3
[HTTP/2 206 0ms]
Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
GET
wss://www.MYDOMAIN.com/ws
[HTTP/1.1 101 Switching Protocols 1093ms]
GET
https://www.MYDOMAIN.com/assets/apple-touch.8a2f0789.png
[HTTP/2 200 0ms]
GET
https://www.MYDOMAIN.com/assets/logo_round.png
[HTTP/2 200 0ms]
GET
https://www.MYDOMAIN.com/assets/RevoltApp.d4dd4107.js
[HTTP/2 200 0ms]
GET
https://www.MYDOMAIN.com/assets/Titlebar.84573465.js
[HTTP/2 200 0ms]
GET
https://www.MYDOMAIN.com/assets/placeholder.a8e8f04f.svg
[HTTP/1.1 200 OK 0ms]
GET
https://www.MYDOMAIN.com/assets/wide.svg
[HTTP/1.1 200 OK 0ms]
GET
https://www.MYDOMAIN.com/api/users/01JV7SD0C15NZ3YCYEE46JYNJB/default_avatar
[HTTP/1.1 200 OK 0ms]
GET
https://www.MYDOMAIN.com/assets/open-sans-latin-500-normal.c64e196f.woff2
[HTTP/2 200 0ms]
GET
https://www.MYDOMAIN.com/assets/Renderer.4d4cd083.js
[HTTP/2 200 0ms]
GET
https://www.MYDOMAIN.com/assets/Renderer.1faefc04.css
[HTTP/2 200 0ms]
GET
https://www.MYDOMAIN.com/assets/open-sans-latin-400-italic.f27408b0.woff2
[HTTP/2 200 0ms]
XHRPOST
https://www.MYDOMAIN.com/autumn/attachments
[HTTP/2 401 291ms]
`
my compose.yml
`name: revolt
services:
MongoDB: Database
database:
image: docker.io/mongo
restart: always
volumes:
- ./data/db:/data/db
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 10s
Redis: Event message broker & KV store
redis:
image: docker.io/eqalpha/keydb
restart: always
RabbitMQ: Internal message broker
rabbit:
image: docker.io/rabbitmq:4
restart: always
environment:
RABBITMQ_DEFAULT_USER: rabbituser
RABBITMQ_DEFAULT_PASS: rabbitpass
volumes:
- ./data/rabbit:/var/lib/rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 10s
timeout: 10s
retries: 3
start_period: 20s
MinIO: S3-compatible storage server
minio:
image: docker.io/minio/minio
command: server /data
volumes:
- ./data/minio:/data
environment:
MINIO_ROOT_USER: minioautumn
MINIO_ROOT_PASSWORD: minioautumn
MINIO_DOMAIN: minio
networks:
default:
aliases:
- revolt-uploads.minio
# legacy support:
- attachments.minio
- avatars.minio
- backgrounds.minio
- icons.minio
- banners.minio
- emojis.minio
restart: always
Caddy: Web server
caddy:
image: docker.io/caddy
restart: always
env_file: .env.web
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./data/caddy-data:/data
- ./data/caddy-config:/config
# <<< ADD THIS LINE >>>
- /var/www/revolt-frontend:/var/www/revolt-frontend:ro
API server
api:
image: ghcr.io/revoltchat/server:20250210-1
depends_on:
database:
condition: service_healthy
redis:
condition: service_started
rabbit:
condition: service_healthy
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
Events service
events:
image: ghcr.io/revoltchat/bonfire:20250210-1
depends_on:
database:
condition: service_healthy
redis:
condition: service_started
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
Web App
web:
image: ghcr.io/revoltchat/client:master
restart: always
env_file: .env.web
File server
autumn:
image: ghcr.io/revoltchat/autumn:20250210-1
depends_on:
database:
condition: service_healthy
createbuckets:
condition: service_started
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
Metadata and image proxy
january:
image: ghcr.io/revoltchat/january:20250210-1
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
Regular task daemon
crond:
image: ghcr.io/revoltchat/crond:20250210-1-debug
depends_on:
database:
condition: service_healthy
minio:
condition: service_started
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
Push notification daemon
pushd:
image: ghcr.io/revoltchat/pushd:20250210-1
depends_on:
database:
condition: service_healthy
redis:
condition: service_started
rabbit:
condition: service_healthy
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
Create buckets for minio.
createbuckets:
image: docker.io/minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
while ! /usr/bin/mc ready minio; do
/usr/bin/mc config host add minio http://minio:9000 minioautumn minioautumn;
echo 'Waiting minio...' && sleep 1;
done;
/usr/bin/mc mb minio/revolt-uploads;
exit 0;
"
`
@YoussefRefaat1976 commented on GitHub (Jun 1, 2025):
I'm trying to fix the issue using CHATGPT for more than 2 weeks, it was working with the file uploading, but after a lot of edits and saving backups without testing all services, including file upload, so I guess I did something. I'm not sure what it is, so I will be very happy if someone helps
@Docteh commented on GitHub (Jun 5, 2025):
If you use a codeblock, you can post a file without it getting... interesting formatting.
It's like this:
```
code block
here
```
Gets you:
And then for your problem, you've got a line in Caddyfile like
header_up Authorization {>Authorization}which seems weird to meThat 401 response is complaining about Authorization. I guess you could ask chatgpt about the line, I know that a conventional search engine wont really be useful for getting an explaination of a line that includes a greater than character as the main thing to look into.