bug: file upload fails
What happened?
Using the default generated configs file upload fails with
type | "InternalError"
location | "crates/core/files/src/lib.rs:103:5"
for me, i seem to be able to upload some files, but others fail and gifs and videos don't work
I am running into the same issue as @VoidNullWarp . I am able to upload files, but GIFs fail. Here is what I'm seeing in the logs:
Upload is successful and image is displayed
$ docker compose logs | grep IMG
autumn-1 | INFO revolt_autumn::api > Received file IMG_4206.jpeg
api-1 | INFO revolt_database::tasks::ack > User None ack in <CHANNEL_ID> with ProcessMessage { messages: [(Some(PushNotification { author: "<NAME>", icon: "https://<PUBLIC_URL>/api/users/<USER_ID>/default_avatar", image: Some("https://<PUBLIC_URL>/autumn/attachments/<FILE_ID>-xFT59SXstLt14HhVVVh9nPCi"), body: "", tag: "<CHANNEL_ID>", timestamp: 1741834212, url: "https://<PUBLIC_URL>/channel/<CHANNEL_ID>/<MESSAGE_ID>", message: Message { id: "<MESSAGE_ID>", nonce: Some("01JP6PHNC43Z7XQ6CZ5CNXWQV3"), channel: "<CHANNEL_ID>", author: "<USER_ID>", user: Some(User { id: "<USER_ID>", username: "<NAME>", discriminator: "6651", display_name: None, avatar: None, relations: [], badges: 0, status: None, flags: 0, privileged: false, bot: None, relationship: None, online: true }), member: Some(Member { id: MemberCompositeKey { server: "<SERVER_ID>", user: "<USER_ID>" }, joined_at: Timestamp("2025-03-12T21:45:42.927000000Z"), nickname: None, avatar: None, roles: [], timeout: None }), webhook: None, content: Some(""), system: None, attachments: Some([File { id: "<FILE_ID>-xFT59SXstLt14HhVVVh9nPCi", tag: "attachments", filename: "IMG_4206.jpeg", metadata: Image { width: 4032, height: 3024 }, content_type: "image/jpeg", size: 2006248, deleted: None, reported: None, message_id: None, user_id: None, server_id: None, object_id: None }]), edited: None, embeds: None, mentions: None, replies: None, reactions: {}, interactions: Interactions { reactions: None, restrict_reactions: false }, masquerade: None, pinned: None, flags: 0 }, channel: TextChannel { id: "<CHANNEL_ID>", server: "<SERVER_ID>", name: "📷visionary", description: None, icon: None, last_message_id: None, default_permissions: None, role_permissions: {}, nsfw: false } }), Message { id: "<MESSAGE_ID>", nonce: Some("01JP6PHNC43Z7XQ6CZ5CNXWQV3"), channel: "<CHANNEL_ID>", author: "<USER_ID>", webhook: None, content: Some(""), system: None, attachments: Some([File { id: "<FILE_ID>-xFT59SXstLt14HhVVVh9nPCi", tag: "attachments", filename: "IMG_4206.jpeg", hash: Some("acdf71b1f8da3cbec3051dabf9ccdf663ace6c657739bebc888d9f4ddc54d8f7"), uploaded_at: Some(Timestamp("2025-03-13T02:50:12.640000000Z")), uploader_id: Some("<USER_ID>"), used_for: None, deleted: None, reported: None, metadata: Image { width: 4032, height: 3024 }, content_type: "image/jpeg", size: 2006248, message_id: None, user_id: None, server_id: None, object_id: None }]), edited: None, embeds: None, mentions: None, replies: None, reactions: {}, interactions: Interactions { reactions: None, restrict_reactions: false }, masquerade: None, pinned: None, flags: None }, [], false)] }
Upload appears to be successful but GIF is not displayed.
$ docker compose logs | grep MangoCatDanceGIF
autumn-1 | INFO revolt_autumn::api > Received file MangoCatDanceGIF.gif
web-1 | [02:32:07] 404 ─ 0.05ms ─ /attachments/YRPW7H592ozVtWYkQTK3XXLZL9q75i3zuynFUFnQpq/MangoCatDanceGIF.gif
web-1 | [02:32:12] 404 ─ 0.06ms ─ /attachments/YRPW7H592ozVtWYkQTK3XXLZL9q75i3zuynFUFnQpq/MangoCatDanceGIF.gif
web-1 | [02:32:21] 404 ─ 0.04ms ─ /attachments/YRPW7H592ozVtWYkQTK3XXLZL9q75i3zuynFUFnQpq/MangoCatDanceGIF.gif
web-1 | [02:32:39] 404 ─ 0.05ms ─ /attachments/YRPW7H592ozVtWYkQTK3XXLZL9q75i3zuynFUFnQpq/MangoCatDanceGIF.gif
web-1 | [02:42:55] 404 ─ 0.05ms ─ /attachments/YRPW7H592ozVtWYkQTK3XXLZL9q75i3zuynFUFnQpq/MangoCatDanceGIF.gif
api-1 | INFO revolt_database::tasks::ack > User None ack in <CHANNEL_KEY> with ProcessMessage { messages: [(Some(PushNotification { author: "<NAME>", icon: "https://<PUBLIC_URL>/api/users/<USER_ID>/default_avatar", image: Some("https://<PUBLIC_URL>/autumn/attachments/YRPW7H592ozVtWYkQTK3XXLZL9q75i3zuynFUFnQpq"), body: "", tag: "<CHANNEL_KEY>", timestamp: 1741833127, url: "https://<PUBLIC_URL>/channel/<CHANNEL_KEY>/<MSG_ID>", message: Message { id: "<MSG_ID>", nonce: Some("<SOME_ID>"), channel: "<CHANNEL_KEY>", author: "<USER_ID>", user: Some(User { id: "<USER_ID>", username: "<NAME>", discriminator: "6651", display_name: None, avatar: None, relations: [], badges: 0, status: None, flags: 0, privileged: false, bot: None, relationship: None, online: true }), member: Some(Member { id: MemberCompositeKey { server: "<SERVER_ID>", user: "<USER_ID>" }, joined_at: Timestamp("2025-03-12T21:45:42.927000000Z"), nickname: None, avatar: None, roles: [], timeout: None }), webhook: None, content: Some(""), system: None, attachments: Some([File { id: "YRPW7H592ozVtWYkQTK3XXLZL9q75i3zuynFUFnQpq", tag: "attachments", filename: "MangoCatDanceGIF.gif", metadata: Image { width: 376, height: 498 }, content_type: "image/gif", size: 13984806, deleted: None, reported: None, message_id: None, user_id: None, server_id: None, object_id: None }]), edited: None, embeds: None, mentions: None, replies: None, reactions: {}, interactions: Interactions { reactions: None, restrict_reactions: false }, masquerade: None, pinned: None, flags: 0 }, channel: TextChannel { id: "<CHANNEL_KEY>", server: "<SERVER_ID>", name: "🛋lounge", description: None, icon: None, last_message_id: None, default_permissions: None, role_permissions: {}, nsfw: false } }), Message { id: "<MSG_ID>", nonce: Some("<SOME_ID>"), channel: "<CHANNEL_KEY>", author: "<USER_ID>", webhook: None, content: Some(""), system: None, attachments: Some([File { id: "YRPW7H592ozVtWYkQTK3XXLZL9q75i3zuynFUFnQpq", tag: "attachments", filename: "MangoCatDanceGIF.gif", hash: Some("65bae6ef70fab8cb33af761fab2e96dcff30b7d0b119384d2ca89036ce9b43d9"), uploaded_at: Some(Timestamp("2025-03-13T02:32:07.458000000Z")), uploader_id: Some("<USER_ID>"), used_for: None, deleted: None, reported: None, metadata: Image { width: 376, height: 498 }, content_type: "image/gif", size: 13984806, message_id: None, user_id: None, server_id: None, object_id: None }]), edited: None, embeds: None, mentions: None, replies: None, reactions: {}, interactions: Interactions { reactions: None, restrict_reactions: false }, masquerade: None, pinned: None, flags: None }, [], false)] }
I can provide additional logs upon request.
I am also experiencing issues with some files uploading and some not, working with many PNG files at this moment and sending to local storage
I have much less luck with s3 storage, haven't gotten any images to upload AND display yet Swapping to backblaze B2 and running docker compose down && docker compose up
Some will refuse upload
autumn-1 | INFO revolt_autumn::api > Received file 256x256.png autumn-1 | Original hash: e7a94de8af984fc64bdeeccfa6fdac2cddb35831f763f8eb5a84bd79c9dddaba autumn-1 | Original size: 146227 bytes autumn-1 | Mime type: image/png autumn-1 | Metadata: Image { width: 256, height: 256 } autumn-1 | Processed file size: 6506 bytes (4.45%). autumn-1 | Processed hash: 14fcb592602a0d208a6e7b255d39caac3742f33991c04c8f25a1578abb0761c4 autumn-1 | Processing took 1.613747ms autumn-1 | INFO revolt_autumn::api > Received file 256x256.png autumn-1 | Original hash: e7a94de8af984fc64bdeeccfa6fdac2cddb35831f763f8eb5a84bd79c9dddaba autumn-1 | Original size: 146227 bytes autumn-1 | Mime type: image/png autumn-1 | Metadata: Image { width: 256, height: 256 } autumn-1 | Processed file size: 6506 bytes (4.45%). autumn-1 | Processed hash: 14fcb592602a0d208a6e7b255d39caac3742f33991c04c8f25a1578abb0761c4 autumn-1 | Processing took 1.381986ms
Some claim to upload, but don't render and don't appear in S3
api-1 | INFO rocket::server > POST /channels/01JVV1DC7FVB7EEWTNS2JED529/messages application/json: api-1 | INFO rocket::server::_ > Matched: (message_send) POST /channels/
/messages api-1 | INFO revolt_database::tasks::last_message_id > Queue is using 1 slots from 10000. api-1 | INFO revolt_database::tasks::process_embeds > Queue is using 1 slots from 10000. api-1 | INFO revolt_database::tasks::ack > Queue is using 1 slots from 10000. Queued type: MENTION api-1 | INFO rocket::server::_ > Outcome: Success(200 OK) api-1 | INFO rocket::server::_ > Response succeeded.
api-1 | INFO rocket::server > PUT /channels/01JVV1DC7FVB7EEWTNS2JED529/ack/01JVV3YK1DJJ96251ZT8E6F5SW: api-1 | INFO rocket::server::_ > Matched: (ack) PUT /channels/
/ack/ api-1 | INFO revolt_database::tasks::ack > Queue is using 1 slots from 10000. Queued type: ACK api-1 | INFO rocket::server::_ > Outcome: Success(204 No Content) api-1 | INFO rocket::server::_ > Response succeeded. api-1 | INFO revolt_database::tasks::ack > User None ack in 01JVV1DC7FVB7EEWTNS2JED529 with ProcessMessage { messages: [(Some(PushNotification { author: "DalekCoffee", icon: "https://REDACTED/api/users/01JVV1ATP8R5DQHY63KTF7X6D7/default_avatar", image: Some("https://REDACTED/autumn/attachments/ZlTZ5GDS2QRak5-O2X0bqGMNwBH4AA821NCI3YfnY3"), body: "", tag: "01JVV1DC7FVB7EEWTNS2JED529", timestamp: 1747888065, url: "https://REDACTED/channel/01JVV1DC7FVB7EEWTNS2JED529/01JVV3YK1DJJ96251ZT8E6F5SW", message: Message { id: "01JVV3YK1DJJ96251ZT8E6F5SW", nonce: Some("01JVV3YH6ZSH82BK7CASC09FE6"), channel: "01JVV1DC7FVB7EEWTNS2JED529", author: "01JVV1ATP8R5DQHY63KTF7X6D7", user: Some(User { id: "01JVV1ATP8R5DQHY63KTF7X6D7", username: "DalekCoffee", discriminator: "6394", display_name: None, avatar: None, relations: [], badges: 0, status: None, flags: 0, privileged: false, bot: None, relationship: None, online: true }), member: Some(Member { id: MemberCompositeKey { server: "01JVV1BQ54V0V3D4BR7SSAWQ61", user: "01JVV1ATP8R5DQHY63KTF7X6D7" }, joined_at: Timestamp("2025-05-22T03:42:30.058000000Z"), nickname: None, avatar: None, roles: [], timeout: None }), webhook: None, content: Some(""), system: None, attachments: Some([File { id: "ZlTZ5GDS2QRak5-O2X0bqGMNwBH4AA821NCI3YfnY3", tag: "attachments", filename: "197f3a93681cbceb.png", metadata: Image { width: 3080, height: 1232 }, content_type: "image/png", size: 1531954, deleted: None, reported: None, message_id: None, user_id: None, server_id: None, object_id: None }]), edited: None, embeds: None, mentions: None, replies: None, reactions: {}, interactions: Interactions { reactions: None, restrict_reactions: false }, masquerade: None, pinned: None, flags: 0 }, channel: TextChannel { id: "01JVV1DC7FVB7EEWTNS2JED529", server: "01JVV1BQ54V0V3D4BR7SSAWQ61", name: "test", description: None, icon: None, last_message_id: Some("01JVV3XENAXQ1NACKN0BTDJY32"), default_permissions: None, role_permissions: {}, nsfw: false } }), Message { id: "01JVV3YK1DJJ96251ZT8E6F5SW", nonce: Some("01JVV3YH6ZSH82BK7CASC09FE6"), channel: "01JVV1DC7FVB7EEWTNS2JED529", author: "01JVV1ATP8R5DQHY63KTF7X6D7", webhook: None, content: Some(""), system: None, attachments: Some([File { id: "ZlTZ5GDS2QRak5-O2X0bqGMNwBH4AA821NCI3YfnY3", tag: "attachments", filename: "197f3a93681cbceb.png", hash: Some("eef6bc6e30bfb02a4d298913261e8feee4bda89413f742c191c27b7e322b0fb3"), uploaded_at: Some(Timestamp("2025-05-22T04:27:45.570000000Z")), uploader_id: Some("01JVV1ATP8R5DQHY63KTF7X6D7"), used_for: None, deleted: None, reported: None, metadata: Image { width: 3080, height: 1232 }, content_type: "image/png", size: 1531954, message_id: None, user_id: None, server_id: None, object_id: None }]), edited: None, embeds: None, mentions: None, replies: None, reactions: {}, interactions: Interactions { reactions: None, restrict_reactions: false }, masquerade: None, pinned: None, flags: None }, [], false)] } api-1 | INFO revolt_database::tasks::last_message_id > Updated last_message_id for 01JVV1DC7FVB7EEWTNS2JED529 to 01JVV3YK1DJJ96251ZT8E6F5SW. api-1 | INFO revolt_database::tasks::ack > User Some("01JVV1ATP8R5DQHY63KTF7X6D7") ack in 01JVV1DC7FVB7EEWTNS2JED529 with AckMessage { id: "01JVV3YK1DJJ96251ZT8E6F5SW" }
Please if someone fix this problem tell me because i have the same issue since weeks
There's not enough information to go off here. When the InternalError occurs I need the logs that the server spits out.