Unable to upload with CLI #2580

Closed
opened 2026-02-05 06:13:19 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @amrit92 on GitHub (Mar 13, 2024).

The bug

Unable to upload with CLI


⋊> ~ immich upload --recursive ~/Pictures/Recent\ photos/xxx/                                                                                                                                                                                                                   16:39:23
(node:431569) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Crawling for assets...
Checking assets | ████████████████████████████████████████ | 100% | ETA: 0s | 316/316 assets
Uploading assets | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/1.5 GB
file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18170
      assetData: new File([await fs__default.openAsBlob(this.path)], basename(this.path)),
                     ^

ReferenceError: File is not defined
    at Asset.getUploadFormData (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18170:22)
    at async Promise.all (index 1)
    at async UploadCommand.uploadAssets (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18458:26)
    at async UploadCommand.upload (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18297:21)
    at async UploadCommand.run (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18220:31)
    at async Command.<anonymous> (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18501:3)

Node.js v18.8.0
⋊> ~     

The OS that Immich Server is running on

Manjaro

Version of Immich Server

1.95.1

Version of Immich Mobile App

N/A

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

n/a

Reproduction steps

1.Just the above command

Additional information

No response

Originally created by @amrit92 on GitHub (Mar 13, 2024). ### The bug Unable to upload with CLI ``` ⋊> ~ immich upload --recursive ~/Pictures/Recent\ photos/xxx/ 16:39:23 (node:431569) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time (Use `node --trace-warnings ...` to show where the warning was created) Crawling for assets... Checking assets | ████████████████████████████████████████ | 100% | ETA: 0s | 316/316 assets Uploading assets | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/1.5 GB file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18170 assetData: new File([await fs__default.openAsBlob(this.path)], basename(this.path)), ^ ReferenceError: File is not defined at Asset.getUploadFormData (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18170:22) at async Promise.all (index 1) at async UploadCommand.uploadAssets (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18458:26) at async UploadCommand.upload (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18297:21) at async UploadCommand.run (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18220:31) at async Command.<anonymous> (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18501:3) Node.js v18.8.0 ⋊> ~ ``` ### The OS that Immich Server is running on Manjaro ### Version of Immich Server 1.95.1 ### Version of Immich Mobile App N/A ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: [ "start.sh", "immich" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env ports: - 2283:3001 depends_on: - redis - database restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.yml # service: hwaccel command: [ "start.sh", "microservices" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env depends_on: - redis - database restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - model-cache:/cache env_file: - .env restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: container_name: immich_postgres image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always volumes: pgdata: model-cache: ``` ### Your .env content ```Shell n/a ``` ### Reproduction steps ```bash 1.Just the above command ``` ### Additional information _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2580