diced / zipline

A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!
https://zipline.diced.sh/
MIT License
1.57k stars 141 forks source link

Bug: FEATURE_THUMBNAILS does not apply to videos inside of public folders #510

Closed cswimr closed 11 months ago

cswimr commented 11 months ago

What happened?

file list: img public folder external link: img

Version

upstream (ghcr.io/diced/zipline:trunk)

What browser(s) are you seeing the problem on?

Firefox, Chromium-based (Chrome, Edge, Brave, Opera, mobile chrome/chromium based, etc), Firefox Mobile

Zipline Logs

2023-12-12 03:27:10,997 AM info  [server::response] GET /folder/REMOVED -> 200
2023-12-12 03:27:10,997 AM debug [server::response] {"method":"GET","url":"/folder/REMOVED","headers":{"host":"seafsh.cc","x-forwarded-scheme":"https","x-forwarded-proto":"https","x-forwarded-for":"REMOVED","x-real-ip":"REMOVED","connection":"close","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://seafsh.cc/dashboard/folders","upgrade-insecure-requests":"1","sec-fetch-dest":"document","sec-fetch-mode":"navigate","sec-fetch-site":"same-origin","sec-fetch-user":"?1","pragma":"no-cache","cache-control":"no-cache","cookie":"user=REMOVED","x-forwarded-host":"seafsh.cc","x-forwarded-port":"3001"}}
2023-12-12 03:27:11,423 AM info  [server::response] GET /r/REMOVED.png?compress=false -> 200
2023-12-12 03:27:11,423 AM debug [server::response] {"method":"GET","url":"/r/REMOVED.png?compress=false","headers":{"host":"seafsh.cc","x-forwarded-scheme":"https","x-forwarded-proto":"https","x-forwarded-for":"REMOVED","x-real-ip":"REMOVED","connection":"close","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","accept":"image/avif,image/webp,*/*","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://seafsh.cc/folder/REMOVED","sec-fetch-dest":"image","sec-fetch-mode":"no-cors","sec-fetch-site":"same-origin","pragma":"no-cache","cache-control":"no-cache","cookie":"user=REMOVED"}}
2023-12-12 03:27:11,445 AM info  [server::response] GET /r/REMOVED.png?compress=false -> 200
2023-12-12 03:27:11,445 AM debug [server::response] {"method":"GET","url":"/r/REMOVED.png?compress=false","headers":{"host":"seafsh.cc","x-forwarded-scheme":"https","x-forwarded-proto":"https","x-forwarded-for":"REMOVED","x-real-ip":"REMOVED","connection":"close","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","accept":"image/avif,image/webp,*/*","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://seafsh.cc/folder/REMOVED","sec-fetch-dest":"image","sec-fetch-mode":"no-cors","sec-fetch-site":"same-origin","pragma":"no-cache","cache-control":"no-cache","cookie":"user=REMOVED"}}
2023-12-12 03:27:11,473 AM info  [server::response] GET /r/REMOVED.png?compress=false -> 200
2023-12-12 03:27:11,473 AM debug [server::response] {"method":"GET","url":"/r/REMOVED.png?compress=false","headers":{"host":"seafsh.cc","x-forwarded-scheme":"https","x-forwarded-proto":"https","x-forwarded-for":"REMOVED","x-real-ip":"REMOVED","connection":"close","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","accept":"image/avif,image/webp,*/*","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://seafsh.cc/folder/REMOVED","sec-fetch-dest":"image","sec-fetch-mode":"no-cors","sec-fetch-site":"same-origin","pragma":"no-cache","cache-control":"no-cache","cookie":"user=REMOVED"}}
2023-12-12 03:27:11,480 AM info  [server::response] GET /r/REMOVED.png?compress=false -> 200
2023-12-12 03:27:11,480 AM debug [server::response] {"method":"GET","url":"/r/REMOVED.png?compress=false","headers":{"host":"seafsh.cc","x-forwarded-scheme":"https","x-forwarded-proto":"https","x-forwarded-for":"REMOVED","x-real-ip":"REMOVED","connection":"close","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","accept":"image/avif,image/webp,*/*","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://seafsh.cc/folder/REMOVED","sec-fetch-dest":"image","sec-fetch-mode":"no-cors","sec-fetch-site":"same-origin","pragma":"no-cache","cache-control":"no-cache","cookie":"user=REMOVED"}}
2023-12-12 03:27:11,488 AM info  [server::response] GET /r/REMOVED.png?compress=false -> 200
2023-12-12 03:27:11,488 AM debug [server::response] {"method":"GET","url":"/r/REMOVED.png?compress=false","headers":{"host":"seafsh.cc","x-forwarded-scheme":"https","x-forwarded-proto":"https","x-forwarded-for":"REMOVED","x-real-ip":"REMOVED","connection":"close","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","accept":"image/avif,image/webp,*/*","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://seafsh.cc/folder/REMOVED","sec-fetch-dest":"image","sec-fetch-mode":"no-cors","sec-fetch-site":"same-origin","pragma":"no-cache","cache-control":"no-cache","cookie":"user=REMOVED"}}
2023-12-12 03:27:11,493 AM info  [server::response] GET /r/REMOVED.png?compress=false -> 200
2023-12-12 03:27:11,493 AM debug [server::response] {"method":"GET","url":"/r/REMOVED.png?compress=false","headers":{"host":"seafsh.cc","x-forwarded-scheme":"https","x-forwarded-proto":"https","x-forwarded-for":"REMOVED","x-real-ip":"REMOVED","connection":"close","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","accept":"image/avif,image/webp,*/*","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://seafsh.cc/folder/REMOVED","sec-fetch-dest":"image","sec-fetch-mode":"no-cors","sec-fetch-site":"same-origin","pragma":"no-cache","cache-control":"no-cache","cookie":"user=REMOVED"}}
2023-12-12 03:27:11,494 AM info  [server::response] GET /r/REMOVED.png?compress=false -> 200
2023-12-12 03:27:11,494 AM debug [server::response] {"method":"GET","url":"/r/REMOVED.png?compress=false","headers":{"host":"seafsh.cc","x-forwarded-scheme":"https","x-forwarded-proto":"https","x-forwarded-for":"REMOVED,"x-real-ip":"REMOVED","connection":"close","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","accept":"image/avif,image/webp,*/*","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://seafsh.cc/folder/REMOVED","sec-fetch-dest":"image","sec-fetch-mode":"no-cors","sec-fetch-site":"same-origin","pragma":"no-cache","cache-control":"no-cache","cookie":"user=REMOVED"}}
2023-12-12 03:27:11,519 AM info  [server::response] GET /r/REMOVED.png?compress=false -> 200
2023-12-12 03:27:11,519 AM debug [server::response] {"method":"GET","url":"/r/REMOVED.png?compress=false","headers":{"host":"seafsh.cc","x-forwarded-scheme":"https","x-forwarded-proto":"https","x-forwarded-for":"REMOVED","x-real-ip":"REMOVED","connection":"close","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","accept":"image/avif,image/webp,*/*","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://seafsh.cc/folder/REMOVED","sec-fetch-dest":"image","sec-fetch-mode":"no-cors","sec-fetch-site":"same-origin","pragma":"no-cache","cache-control":"no-cache","cookie":"user=REMOVED"}}
2023-12-12 03:27:11,879 AM info  [server::response] GET /folder/REMOVED/info/refs?service=git-upload-pack -> 404
2023-12-12 03:27:11,879 AM debug [server::response] {"method":"GET","url":"/folder/REMOVED/info/refs?service=git-upload-pack","headers":{"host":"seafsh.cc","x-forwarded-scheme":"https","x-forwarded-proto":"https","x-forwarded-for":"172.17.0.1","x-real-ip":"172.17.0.1","connection":"close","user-agent":"git/2.30.2","accept":"*/*","accept-encoding":"deflate, gzip, br","pragma":"no-cache","git-protocol":"version=2","x-forwarded-host":"seafsh.cc","x-forwarded-port":"3001"}}
2023-12-12 03:27:12,484 AM info  [server::response] GET /api/user/folders? -> 200
2023-12-12 03:27:12,484 AM debug [server::response] {"method":"GET","url":"/api/user/folders?","headers":{"host":"seafsh.cc","x-forwarded-scheme":"https","x-forwarded-proto":"https","x-forwarded-for":"REMOVED","x-real-ip":"REMOVED","connection":"close","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","accept":"*/*","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://seafsh.cc/folder/REMOVED","sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin","pragma":"no-cache","cache-control":"no-cache","cookie":"user=REMOVED","x-middleware-invoke":"","x-invoke-path":"/api/user/folders","x-invoke-query":"%7B%7D","x-invoke-output":"/api/user/folders","x-forwarded-host":"seafsh.cc","x-forwarded-port":"3001"}}
2023-12-12 03:27:12,609 AM info  [server::response] GET /favicon.ico -> 200
2023-12-12 03:27:12,610 AM debug [server::response] {"method":"GET","url":"/favicon.ico","headers":{"host":"seafsh.cc","x-forwarded-scheme":"https","x-forwarded-proto":"https","x-forwarded-for":"REMOVED","x-real-ip":"REMOVED","connection":"close","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","accept":"image/avif,image/webp,*/*","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://seafsh.cc/folder/REMOVED","sec-fetch-dest":"image","sec-fetch-mode":"no-cors","sec-fetch-site":"same-origin","pragma":"no-cache","cache-control":"no-cache","cookie":"user=REMOVED"}}

Browser Logs

No response

Additional Info

Docker Compose:

version: '3'
services:
  postgres:
    image: postgres:15
    restart: unless-stopped
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DATABASE=postgres
    volumes:
      - pg_data:/var/lib/postgresql/data
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U postgres']
      interval: 10s
      timeout: 5s
      retries: 5

  zipline:
    image: ghcr.io/diced/zipline:trunk
    ports:
      - '3001:3001'
    restart: unless-stopped
    environment:
      - CORE_RETURN_HTTPS=true
      - CORE_SECRET=removed
      - CORE_HOST=0.0.0.0
      - CORE_DATABASE_URL=postgres://postgres:postgres@postgres/postgres     
      - CORE_PORT=3001
      - CORE_LOGGER=true
      - DATASOURCE_TYPE=s3
      - DATASOURCE_S3_SECRET_ACCESS_KEY=removed
      - DATASOURCE_S3_ACCESS_KEY_ID=removed
      - DATASOURCE_S3_ENDPOINT=removed
      - DATASOURCE_S3_BUCKET=zipline
      - DATASOURCE_S3_FORCE_S3_PATH=true
      - DATASOURCE_S3_REGION=removed
      - DATASOURCE_S3_USE_SSL=true
      - WEBSITE_TITLE=TidalStream
      - DISCORD_URL=removed
      - DISCORD_UPLOAD_USERNAME=TidalStream Uploads
      - DISCORD_SHORTEN_USERNAME=TidalStream URLs
      - DISCORD_UPLOAD_EMBED_IMAGE=true
      - DISCORD_SHORTEN_EMBED_IMAGE=false
      - DISCORD_UPLOAD_EMBED_TITLE=New file uploaded!
      - DISCORD_SHORTEN_EMBED_TITLE=New URL shortened!
      - DISCORD_UPLOAD_EMBED_DESCRIPTION=**User:** `{user.username}`\n**Size:** `{file.size::bytes}`
      - DISCORD_SHORTEN_EMBED_DESCRIPTION=**User:** `{user.username}`\n**Vanity:** `{url.vanity}`\n**Destination:** `{url.destination}`
      - DISCORD_UPLOAD_EMBED_FOOTER=File ID - {file.id}
      - DISCORD_SHORTEN_EMBED_FOOTER=URL ID - {url.id}
      - DISCORD_UPLOAD_EMBED_COLOR=0x0c101c
      - DISCORD_SHORTEN_EMBED_COLOR=0x0c101c
      - DISCORD_AVATAR_URL=https://seafsh.cc/tidalstream.png
      - MFA_TOTP_ENABLED=true
      - EXIF_ENABLED=true 
      - OAUTH_DISCORD_CLIENT_ID=removed
      - OAUTH_DISCORD_CLIENT_SECRET=removed
      - FEATURES_OAUTH_REGISTRATION=true
      - FEATURES_OAUTH_LOGIN_ONLY=true
      - UPLOADER_USER_LIMIT=5gb
      - UPLOADER_ADMIN_LIMIT=5gb
      - WEBSITE_SHOW_FILES_PER_USER=false
      - FEATURES_THUMBNAILS=true
      - DEBUG=true
    volumes:
      - './uploads:/zipline/uploads'
      - './public:/zipline/public'
    depends_on:
      - 'postgres'

volumes:
  pg_data:
diced commented 11 months ago

fixed https://github.com/diced/zipline/commit/6fef197620848dce6165adf4d53bfbd290e5e67b