[BUG] Can't uplodad a file named ".jpg" or ".mp4" #1708

Closed
opened 2026-02-05 03:13:46 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @simulot on GitHub (Dec 1, 2023).

The bug

Dropping a file named ".jpg" or ".mp4" on the app's page gives an error 400 Bad request.

The OS that Immich Server is running on

Debian

Version of Immich Server

1.89.0

Version of Immich Mobile App

N/A

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

Not relevant

Your .env content

Not relevant

Reproduction steps

Rename perfectly valide jpg file as ".JPG" and drop it on the app page.

Same behavior when uploading this using immich-go.

Additional information

Problem revealed by Tomato 🍅 on this discord server thread

Originally created by @simulot on GitHub (Dec 1, 2023). ### The bug Dropping a file named ".jpg" or ".mp4" on the app's page gives an error 400 Bad request. ### The OS that Immich Server is running on Debian ### Version of Immich Server 1.89.0 ### Version of Immich Mobile App N/A ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML Not relevant ``` ### Your .env content ```Shell Not relevant ``` ### Reproduction steps ```bash Rename perfectly valide jpg file as ".JPG" and drop it on the app page. Same behavior when uploading this using immich-go. ``` ### Additional information Problem revealed by Tomato 🍅 on this [discord server thread](https://discord.com/channels/979116623879368755/1179517794606395462)
Author
Owner

@simulot commented on GitHub (Dec 1, 2023):

Done a second ago
image

Here a 403 because of the restriction

On my test server:
image

@simulot commented on GitHub (Dec 1, 2023): Done a second ago ![image](https://github.com/immich-app/immich/assets/5980377/c9bc9203-1875-4931-92fe-e164e31c927c) Here a 403 because of the restriction On my test server: ![image](https://github.com/immich-app/immich/assets/5980377/de2f3a41-6e8b-4eb2-b426-d71e75e49b32)
Author
Owner

@jrasm91 commented on GitHub (Jul 3, 2024):

I looked into this. It's not that hard to change the app to support uploading it. However, it does lead to a lot of weird circumstances. Like a lot of the code relies on the fact that a file has a base name and an extension. The storage template in particular. Allowing the file to be named just .jpg or .mp4 introduces a lot of edge cases that I don't think are worth supporting. So going to close this as not planned.

@jrasm91 commented on GitHub (Jul 3, 2024): I looked into this. It's not that hard to change the app to support uploading it. However, it does lead to a lot of weird circumstances. Like a lot of the code relies on the fact that a file has a base name and an extension. The storage template in particular. Allowing the file to be named just `.jpg` or `.mp4` introduces a lot of edge cases that I don't think are worth supporting. So going to close this as not planned.
Author
Owner

@simulot commented on GitHub (Jul 3, 2024):

We can find those weird cases in google takeout files.
It's managed by immich-go by pretending the file name is noname.jpg

@simulot commented on GitHub (Jul 3, 2024): We can find those weird cases in google takeout files. It's managed by immich-go by pretending the file name is noname.jpg
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1708