Giter Club home page Giter Club logo

shotshare's Issues

Be able to upload an avatar

Every user have an avatar with the first character in their name. But no ability to upload an avatar. Are you working on a avatar feature or is it only there for design purpose? Either way, please add a feature where you can upload an avatar for your account :)

Option to set images to be visible only by logged-in users

Just a feature request to create private images, accessible only to users who are logged in to view an image, even if linked directly. (maybe not the direct image link, but at minimum the image view page.) This option should ideally be toggleable after upload, to make an image private that was public or vice-versa without deleting it.

Allow videos to be uploaded

I was hoping to use this cool software to have Web GUI to manage the files / clips that I want shared on my domain, but only images are allowed which is fair enough for its intended purpose but allowing videos as an optional feature would be extremely useful :)

[ERROR] Create user via CLI - could not find driver

docker run -d \
  --name shotshare \
  --restart unless-stopped \
  -p 50582:80 \
  -e TZ=Europe/Bucharest \
  -e HOST=":80" \
  -e FEATURE_UUID_ROUTES=true \
  -e ALLOW_REGISTRATION=true \
  -e DB_CONNECTION=pgsql \
  -e DB_HOST=IP \
  -e DB_PORT=PORT \
  -e DB_DATABASE=shotshare \
  -e DB_USERNAME=shotshare \
  -e DB_PASSWORD=shotshare \
  -e PHP_UPLOAD_MAX_FILESIZE=512M \
  -e PHP_POST_MAX_SIZE=512M \
  -e PHP_MEMORY_LIMIT=756M \
  -e FEATURE_FOOTER=false \
  -v ~/.shotshare:/app/storage/app/uploads \
  mdshack/shotshare:latest
docker exec -it shotshare php artisan shotshare:create-user
Illuminate\Database\QueryException

  could not find driver (Connection: pgsql, SQL: insert into "users" ("name", "email", "password", "updated_at", "created_at") values (Test User, [email protected], $2y$12$N7HjOrXmRq7Ian.6jM1aMeihZB4pTXRbLz.TfBG61LS2YSVr678EW, 2024-06-27 18:36:15, 2024-06-27 18:36:15) returning "id")

Option to copy a hyperlinked thumbnail to the clipboard instead of merely the URL

My Typical Use Case

Obviously other users would have different use cases. Nonetheless, I think an example would help you to easily understand how users might use this feature.

I use Google Workspace (primarily Google Docs) kind of, sort of like a wiki. I tend to post many images inside of my Google Docs. To avoid surpassing Google Workspace's 15GB freemium limit, I like to keep videos and images out of Google Docs and off of Google Drive.

Therefore, instead of merely having a URL of an image I upload to ShotShare copied to my clipboard, I would like to get a thumbnail that is hyperlinked to the image I just uploaded to ShotShare.

My Typical Workflow

  1. I would configure Flameshot to have an option to upload images to, what would be, my self-hosted instance of ShotShare (instead of the default image sharing site which is, surprise, surprise, Imgur https://i.imgur.com/cQPrqNG.png)
  2. Take a screenshot using Flameshot.
  3. Press the Enter key to upload the image from my clipboard to ShotShare (instead of Imgur).
  4. Open up a Google Doc.
  5. Choose Paste so that the hyperlinked thumbnail of the image would be pasted into that Google Doc.

Primary Benefit of the Feature for me

I will be able to avoid creating large Google Docs (and concomitantly remain within the 15GB limit imposed on the Google Workspace's freemium version), yet see a little thumbnail which I could click on to see the image I had posted to ShotShare.

Related Features

  1. Allow users to define the border thickness and color to help them to subconsciously realize without even thinking, "Oh yeah, that thumbnail [in, for example, a Google Doc] is of an image I posted on ShotShare."
  2. Allow users to choose the percentage of the original size for the size of the thumbnail. Because someone, somewhere might actually want larger "thumbnails", allow users to enter 1 to 1000, where 100 would be the original size (100%), 1 would be 1% of the original size, and 1,000 which would be ten times the original size.
  3. Allow users to choose JPG, PNG, or, well, I don't know much about image formats, but perhaps another image format.
  4. Allow users to choose to create thumbnails in color or grayscale. (Think of users who are serving wepages from an IoT device which, despite having limited resources, does actually serve webpages).
  5. Allow the user to press a hotkey to cycle between paste link only, paste hyperlinked thumbnail, and paste thumbnail only.
  6. Ideally create a version that doesn't require a database at all (not even SQLite). I'm thinking of DokuWiki which makes it trivial to backup and redeploy. I am thinking of users who don't plan to actually scroll through images on ShotShare, but rather only intend to link to images on ShotShare. For them, I'm guessing a database might not be necessary, particularly if they only had, say ten thousand or twenty thousand images on ShotShare. I suppose, if someone were to have many millions of images on ShotShare, they might need at least an SQLlite database, in either case.

Integrations with other FOSS

  1. Get the devs at Flameshot to include this feature as an option in Flameshot.
  2. Get the dev at SingleFile to include this feature as an option in SingleFile. This point would be very helpful to me, because even if I upload a HTML file I created with SingleFile to Google Drive, I need to download it from Google Drive to view it because Google Drive does not natively display HTML files, and because I refuse to use any plugins, in my Google Drive (because I'm extra cautious about using plugins), and because many of the HTML pages I create with SingleFile are large.

Final Note

SingleFile is the bees knees because, in a sense, it is as if it generates a PDF in that the files it creates are WYSIWYG (What You SAW Is What You Get), yet because it actually generates HTML, the files it creates are generally much more performant than PDFs.

Guest access

@mdshack BTW what about an option to set anonymous/guest access (i.e. w/o account)? In case I can open a specific request issue.

Originally posted by @amenolo in #32

Laravel Octane + FrankenPHP

Move from FPM + Caddy to FrankenPHP + Octane. Will give us speed benefits, while also giving us the chance to revisit our deployment instructions as those have led to some issues with some installations.

Option to randomize shot URLs

At the moment, all shots uploaded are given a number in increasing consecutive order. This would make it trivial to view shots not intended for the recipient by simply changing the number. The direct links are already randomized; perhaps that could be used in place of the consecutive numbering for the viewing page.

[Bug] All resources are linked using hostname localhost instead of HOST or $host

I followed the directions in README.md, setting up a basic http server (no SSL yet) on a VPS on port 2000 (I'm planning to reverse proxy via nginx on 80 once it's working). When I load the site up in my browser, I'm met with a blank page and the source has such delightful snippets as

const Ziggy = {"url":"http:\\/localhost:2000","port":2000,

and

<link rel="preload" as="style" href="[http://localhost:2000/build/assets/app-74558acf.css](view-source:http://localhost:2000/build/assets/app-74558acf.css)" />

The command I used to start the Docker container is exactly as written in README.md, except with -p 2000:2000 -e HOST=":2000" replacing -p 80:80 -e HOST=":80"

I tried setting HOST to the FQDN I'm using, but that just results in the site timing out.

SQLite database is not able to be written to by default Docker setup

I got a 500 internal server error when attempting to register an account. I checked the logs in /app/storage/logs and found an exception:

[previous exception] [object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 8 attempt to write a readonly database at /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:580)

So I navigated to /app/database/ to check and lo and behold, database.sqlite is owned by root:root. I chown'd to www-data:www-data and the user registration started working again.

I have no idea what the security implications of this are, but being unable to write to the database seems like an oversight.

Albums/galleries

Just a feature request for multi-image galleries. I'm not 100% sure what the best way to implement that would be, but a start would probably be to allow users to collect shots they've previously uploaded and display certain ones on the same page together. On-the-fly albums by supporting multiple image uploads could probably be a nice next step.

Blank home page

Using a http instance (latest release) is resulting in a blank page, both behind Nginx Proxy Manager with default config - which is otherwise working fine - and in case of direct access.

Same wih release 1.9.0 behind Nginx Proxy Manager only.

Browser independent. Any hints? Thanks!

image

image

Cloud-based Providers (S3) Support

Ability to use cloud storage to store Avatars & Shots. This should be fairly easy with Laravel, however links/urls to the shots may be our biggest hurdle with hooking up to cloud storage as we rely on symlinks to make this work in the current version.

Add ShareX integration

Original idea came from this thread.

ShareX looks like it could be a great client for ShotShare. It also looks like we have most of the components needed to implement the custom uploader setup. One of the major blockers for implementing this is having authentication tokens. I believe we should be able to do a low-lift implementation of Laravel Sanctum to get what we need.

Requirements

  • API compatible with ShareX
  • Authentication method for ShareX
  • An example configuration for ShareX
  • Documentation on setting up ShareX with ShotShare (make these instructions endpoint agnostic, since ShotShare is self-hosted)
  • Ability to manage sanctum tokens (on the profile screen)

Issues deploying with docker / portainer

Hello.
I'm a portainer user and wanted to try shotshare as is looks exactly like what I need :)

I followed these steps:
sudo mkdir Shotshare and cd into this directory
sudo touch .env database.sqlite
sudo chown 82:82 .env database.sqlite

and then tried this docker-compose:

version: "3.3"
services:
  shotshare:
    ports:
      - 8008:80
    environment:
      - HOST=:80
    volumes:
      - /srv/Files/Shotshare/shotshare_data:/app/storage
      - /srv/Files/Shotshare/database.sqlite:/app/database/database.sqlite
      - /srv/Files/Shotshare/.env:/app/.env
    restart: unless-stopped
    container_name: shotshare
    image: mdshack/shotshare:latest
volumes:
  shotshare_data: {}
networks: {}

I does not work. Can you help me understand why ?
Thank you

Optional EXIF Stripping

Those hosting ShotShare should be able to optionally (via an environment variable) include EXIF stripping for their installation of ShatShare.

[Bug] Generated labels for input boxes do not match any element

On the shots page of a given image, each share link uses this HTML:

<div>
	<label for="email" class="mb-2 block text-sm tracking-tight font-medium text-foreground text-left mb-2">Share Link</label>
	<div class="relative">
		<input class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50">
		<button class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent h-10 px-4 py-2 absolute right-0 top-0 bottom-0 text-accent hover:text-primary absolute right-0 top-0 bottom-0 text-accent hover:text-primary">
		<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" class="h-5 w-5">
			<path stroke-linecap="round" stroke-linejoin="round" d="M15.666 3.888A2.25 2.25 0 0013.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 01-.75.75H9a.75.75 0 01-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 01-2.25 2.25H6.75A2.25 2.25 0 014.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 011.927-.184"></path>
		</svg>
		</button>
	</div>
</div>

However, there is no #email element, which is what should be referred to with the for= attribute under the label tag. I imagine this is a vestige of an older version. Each parent div (or, at minimum, the referenced input element) should have unique IDs assigned so that the for= attribute resolves.

This would additionally have a knock-on effect, enabling share links to be hidden (per #25) using CSS overrides instead of any kind of server-side configuration.

Accounts with admin privileges

Alongside #23 and #24, an account having the ability to do the same to images uploaded by other users would be nice. I'm not sure how this could be implemented client-side; perhaps only accounts added with php artisan shotshare:create-user (or maybe a separate shotshare:create-admin command?) could have this kind of access.

This is definitely a 2.0 type feature, though. It can wait.

Missing directories/files are not created if needed

On a whim, and to see if I could keep things on my host machine, instead of creating a Docker volume with -v shotshare_data:/app/storage I created a directory under my host machine's ShotShare stuff, chown'd to 82:82 and mounted it with --mount type=bind,source=/shotshare/data,target=/app/storage. This threw a 500 error (from caddy, not from nginx) so I went digging. It looks like the logger will create /app/storage/logs/ if needed, but if the empty directories already present in the Docker image aren't there as expected then ShotShare won't create them. Namely:

  • /app/storage/app/
  • /app/storage/app/public/
  • /app/storage/framework/
  • /app/storage/framework/cache/
  • /app/storage/framework/cache/data/
  • /app/storage/framework/testing/
  • /app/storage/framework/views/

Interestingly, an exception to this is /app/storage/app/uploads/, which gets created on first upload just fine.

"Server Error"

I think it has something to do with my reverse proxy, but once I log in, accessing via shotshare.mydomain.com, this is what I get:

Screen Shot 2024-04-21 at 10 21 34 PM

Also, I'm using Docker Desktop on Mac but am using the linux/amd64 image. However, I've had success using other linux/amd64 images.

Any help would be appreciated. Thanks.

Here is my shotshare.subdomain.conf for SWAG:

## Version 2023/05/31
# REMOVE THIS LINE BEFORE SUBMITTING: The structure of the file (all of the existing lines) should be kept as close as possible to this template.
# REMOVE THIS LINE BEFORE SUBMITTING: Look through this file for <tags> and replace them. Review other sample files to see how things are done.
# REMOVE THIS LINE BEFORE SUBMITTING: The comment lines at the top of the file (below this line) should explain any prerequisites for using the proxy such as DNS or app settings.
# make sure that your shotshare container is named shotshare
# make sure that your dns has a cname set for shotshare

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name shotshare.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth (requires ldap-location.conf in the location block)
    #include /config/nginx/ldap-server.conf;

    # enable for Authelia (requires authelia-location.conf in the location block)
    #include /config/nginx/authelia-server.conf;

    # enable for Authentik (requires authentik-location.conf in the location block)
    #include /config/nginx/authentik-server.conf;

    location / {
        # enable the next two lines for http auth
        #auth_basic "Restricted";
        #auth_basic_user_file /config/nginx/.htpasswd;

        # enable for ldap auth (requires ldap-server.conf in the server block)
        #include /config/nginx/ldap-location.conf;

        # enable for Authelia (requires authelia-server.conf in the server block)
        #include /config/nginx/authelia-location.conf;

        # enable for Authentik (requires authentik-server.conf in the server block)
        #include /config/nginx/authentik-location.conf;

        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app shotshare;
        set $upstream_port 80;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        # REMOVE THIS LINE BEFORE SUBMITTING: Additional proxy settings such as headers go below this line, leave the blank line above.
    }

    # REMOVE THIS LINE BEFORE SUBMITTING: Some proxies require one or more additional location blocks for things like API or RPC endpoints.
    # REMOVE THIS LINE BEFORE SUBMITTING: If the proxy you are making a sample for does not require an additional location block please remove the commented out section below.
    # location ~ (/shotshare)?/api {
    #     include /config/nginx/proxy.conf;
    #     include /config/nginx/resolver.conf;
    #     set $upstream_app shotshare;
    #     set $upstream_port 80;
    #     set $upstream_proto http;
    #     proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    #
    #     # REMOVE THIS LINE BEFORE SUBMITTING: Additional proxy settings such as headers go below this line, leave the blank line above.
    # }
}

Here are the logs:

04/21/2024
10:16:52 PM
04/21/2024
10:16:52 PM
   INFO  Preparing database.  
04/21/2024
10:16:52 PM
04/21/2024
10:16:52 PM
  Creating migration table ......................................... 28ms DONE
04/21/2024
10:16:52 PM
04/21/2024
10:16:52 PM
   INFO  Running migrations.  
04/21/2024
10:16:52 PM
04/21/2024
10:16:52 PM
  2014_10_12_000000_create_users_table ............................. 12ms DONE
04/21/2024
10:16:52 PM
  2014_10_12_100000_create_password_reset_tokens_table .............. 8ms DONE
04/21/2024
10:16:52 PM
  2019_08_19_000000_create_failed_jobs_table ....................... 10ms DONE
04/21/2024
10:16:52 PM
  2019_12_14_000001_create_personal_access_tokens_table ............ 10ms DONE
04/21/2024
10:16:52 PM
  2023_12_07_052547_create_shots_table .............................. 7ms DONE
04/21/2024
10:16:52 PM
  2023_12_29_181202_update_shots_table_add_parent_shot_id ........... 8ms DONE
04/21/2024
10:16:52 PM
  2024_01_14_015100_create_shot_reactions_table ................... 122ms DONE
04/21/2024
10:16:52 PM
  2024_01_14_211116_update_shots_table_add_uuid .................... 59ms DONE
04/21/2024
10:16:52 PM
  2024_01_14_213925_update_shots_table_add_name .................... 23ms DONE
04/21/2024
10:16:52 PM
  2024_01_15_215829_update_personal_access_tokens_add_anonymized_column  4ms DONE
04/21/2024
10:16:52 PM
  2024_01_16_032703_update_shots_table_add_visibity_settings ....... 25ms DONE
04/21/2024
10:16:52 PM
04/21/2024
10:16:53 PM
Caching application configuration
04/21/2024
10:16:54 PM
04/21/2024
10:16:54 PM
   INFO  Configuration cached successfully.  
04/21/2024
10:16:54 PM
04/21/2024
10:16:54 PM
[22-Apr-2024 05:16:54] NOTICE: fpm is running, pid 18
04/21/2024
10:16:54 PM
[22-Apr-2024 05:16:54] NOTICE: ready to handle connections
04/21/2024
10:16:55 PM
config_adapter=
config_file=
/etc/caddy/Caddyfile
level=
info
msg=
using provided configuration
ts=
1713763015.6450381
04/21/2024
10:16:55 PM
adapter=
caddyfile
file=
/etc/caddy/Caddyfile
level=
warn
line=
2
msg=
Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies
ts=
1713763015.684786
04/21/2024
10:16:55 PM
address=
localhost:2019
enforce_origin=
false
level=
info
logger=
admin
msg=
admin endpoint started
origins=
["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]
ts=
1713763015.748251
04/21/2024
10:16:55 PM
http_port=
80
level=
warn
logger=
http.auto_https
msg=
server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server
server_name=
srv0
ts=
1713763015.7644181
04/21/2024
10:16:55 PM
cache=
0xc0003c4100
level=
info
logger=
tls.cache.maintenance
msg=
started background certificate maintenance
ts=
1713763015.764927
04/21/2024
10:16:55 PM
error=
open /data/caddy/instance.uuid: no such file or directory
level=
warn
logger=
tls
msg=
unable to get instance ID; storage clean stamps will be incomplete
ts=
1713763015.7808151
04/21/2024
10:16:55 PM
level=
info
logger=
http.log
msg=
server running
name=
srv0
protocols=
["h1","h2","h3"]
ts=
1713763015.7922146
04/21/2024
10:16:55 PM
level=
info
logger=
tls
msg=
cleaning storage unit
storage=
FileStorage:/data/caddy
ts=
1713763015.7963858
04/21/2024
10:16:55 PM
file=
/config/caddy/autosave.json
level=
info
msg=
autosaved config (load with --resume flag)
ts=
1713763015.797795
04/21/2024
10:16:55 PM
level=
info
msg=
serving initial configuration
ts=
1713763015.7981322
04/21/2024
10:16:55 PM
level=
info
logger=
tls
msg=
finished cleaning storage units
ts=
1713763015.798942
04/21/2024
10:17:10 PM
127.0.0.1 -  22/Apr/2024:05:17:09 +0000 "GET /index.php" 200
04/21/2024
10:17:10 PM
bytes_read=
0
duration=
0.903779584
level=
info
logger=
http.log.access
msg=
handled request
request.client_ip=
172.19.0.27
request.headers.Accept=
["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"]
request.headers.Accept-Encoding=
["gzip, br"]
request.headers.Accept-Language=
["en-US,en;q=0.9"]
request.headers.Cdn-Loop=
["cloudflare"]
request.headers.Cf-Connecting-Ip=
["2601:644:4901:3540:ec8a:7ee3:475c:6977"]
request.headers.Cf-Ipcountry=
["US"]
request.headers.Cf-Ray=
["87832555b86617f2-SJC"]
request.headers.Cf-Visitor=
["{"scheme":"https"}"]
request.headers.Connection=
["close"]
request.headers.Cookie=
[]
request.headers.Priority=
["u=0, i"]
request.headers.Sec-Ch-Ua=
[""Opera";v="109", "Not:A-Brand";v="8", "Chromium";v="123""]
request.headers.Sec-Ch-Ua-Mobile=
["?0"]
request.headers.Sec-Ch-Ua-Platform=
[""macOS""]
request.headers.Sec-Fetch-Dest=
["document"]
request.headers.Sec-Fetch-Mode=
["navigate"]
request.headers.Sec-Fetch-Site=
["none"]
request.headers.Sec-Fetch-User=
["?1"]
request.headers.Upgrade-Insecure-Requests=
["1"]
request.headers.User-Agent=
["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 OPR/109.0.0.0"]
request.headers.X-Forwarded-For=
["2601:644:4901:3540:ec8a:7ee3:475c:6977, 192.168.65.1"]
request.headers.X-Forwarded-Host=
["shotshare.mydomain.com"]
request.headers.X-Forwarded-Method=
["GET"]
request.headers.X-Forwarded-Port=
["443"]
request.headers.X-Forwarded-Proto=
["https"]
request.headers.X-Forwarded-Server=
["shotshare.mydomain.com"]
request.headers.X-Forwarded-Ssl=
["on"]
request.headers.X-Forwarded-Uri=
["/login"]
request.headers.X-Original-Method=
["GET"]
request.headers.X-Original-Url=
["https://shotshare.mydomain.com/login"]
request.headers.X-Real-Ip=
["192.168.65.1"]
request.host=
shotshare.mydomain.com
request.method=
GET
request.proto=
HTTP/1.1
request.remote_ip=
172.19.0.27
request.remote_port=
48020
request.uri=
/login
resp_headers.Cache-Control=
["no-cache, private"]
resp_headers.Content-Encoding=
["gzip"]
resp_headers.Content-Type=
["text/html; charset=UTF-8"]
resp_headers.Date=
["Mon, 22 Apr 2024 05:17:10 GMT"]
resp_headers.Link=
["<https://shotshare.mydomain.com/build/assets/app-4fc500d4.css>; rel="preload"; as="style", <https://shotshare.mydomain.com/build/assets/app-543e2154.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/Login-b473878e.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/GuestLayout-a9c336ea.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/TextInput-2296ae11.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/Button-0d4eb7bb.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/index-ef4dc35b.js>; rel="modulepreload""]
resp_headers.Server=
["Caddy"]
resp_headers.Set-Cookie=
[]
resp_headers.Vary=
["X-Inertia","Accept-Encoding"]
resp_headers.X-Powered-By=
["PHP/8.3.6"]
size=
8143
status=
200
ts=
1713763030.5132325
user_id=
04/21/2024
10:17:12 PM
bytes_read=
0
duration=
0.789861293
level=
info
logger=
http.log.access
msg=
handled request
request.client_ip=
172.19.0.27
request.headers.Accept=
["text/html,application/xhtml+xml,application/xml"]
request.headers.Accept-Encoding=
["gzip, br"]
request.headers.Cdn-Loop=
["cloudflare"]
request.headers.Cf-Connecting-Ip=
["67.180.3.57"]
request.headers.Cf-Ipcountry=
["US"]
request.headers.Cf-Ray=
["87832563fbfb2536-SJC"]
request.headers.Cf-Visitor=
["{"scheme":"https"}"]
request.headers.Connection=
["close"]
request.headers.Dnt=
["1"]
request.headers.Upgrade-Insecure-Requests=
["1"]
request.headers.User-Agent=
["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Safari/537.36"]
request.headers.X-Forwarded-For=
["67.180.3.57, 192.168.65.1"]
request.headers.X-Forwarded-Host=
["shotshare.mydomain.com"]
request.headers.X-Forwarded-Method=
["GET"]
request.headers.X-Forwarded-Port=
["443"]
request.headers.X-Forwarded-Proto=
["https"]
request.headers.X-Forwarded-Server=
["shotshare.mydomain.com"]
request.headers.X-Forwarded-Ssl=
["on"]
request.headers.X-Forwarded-Uri=
["/login"]
request.headers.X-Original-Method=
["GET"]
request.headers.X-Original-Url=
["https://shotshare.mydomain.com/login"]
request.headers.X-Real-Ip=
["192.168.65.1"]
request.host=
shotshare.mydomain.com
request.method=
GET
request.proto=
HTTP/1.1
request.remote_ip=
172.19.0.27
request.remote_port=
48036
request.uri=
/login
resp_headers.Cache-Control=
["no-cache, private"]
resp_headers.Content-Encoding=
["gzip"]
resp_headers.Content-Type=
["text/html; charset=UTF-8"]
resp_headers.Date=
["Mon, 22 Apr 2024 05:17:12 GMT"]
resp_headers.Link=
["<https://shotshare.mydomain.com/build/assets/app-4fc500d4.css>; rel="preload"; as="style", <https://shotshare.mydomain.com/build/assets/app-543e2154.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/Login-b473878e.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/GuestLayout-a9c336ea.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/TextInput-2296ae11.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/Button-0d4eb7bb.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/index-ef4dc35b.js>; rel="modulepreload""]
resp_headers.Server=
["Caddy"]
resp_headers.Set-Cookie=
[]
resp_headers.Vary=
["X-Inertia","Accept-Encoding"]
resp_headers.X-Powered-By=
["PHP/8.3.6"]
size=
8143
status=
200
ts=
1713763032.7116854
user_id=
04/21/2024
10:17:12 PM
127.0.0.1 -  22/Apr/2024:05:17:11 +0000 "GET /index.php" 200
04/21/2024
10:17:18 PM
bytes_read=
87
duration=
1.92890321
level=
error
logger=
http.log.access
msg=
handled request
request.client_ip=
172.19.0.27
request.headers.Accept=
["text/html, application/xhtml+xml"]
request.headers.Accept-Encoding=
["gzip, br"]
request.headers.Accept-Language=
["en-US,en;q=0.9"]
request.headers.Cdn-Loop=
["cloudflare"]
request.headers.Cf-Connecting-Ip=
["2601:644:4901:3540:ec8a:7ee3:475c:6977"]
request.headers.Cf-Ipcountry=
["US"]
request.headers.Cf-Ray=
["87832582ae4117f2-SJC"]
request.headers.Cf-Visitor=
["{"scheme":"https"}"]
request.headers.Connection=
["close"]
request.headers.Content-Length=
["87"]
request.headers.Content-Type=
["application/json"]
request.headers.Cookie=
[]
request.headers.Origin=
["https://shotshare.mydomain.com"]
request.headers.Priority=
["u=1, i"]
request.headers.Referer=
["https://shotshare.mydomain.com/login"]
request.headers.Sec-Ch-Ua=
[""Opera";v="109", "Not:A-Brand";v="8", "Chromium";v="123""]
request.headers.Sec-Ch-Ua-Mobile=
["?0"]
request.headers.Sec-Ch-Ua-Platform=
[""macOS""]
request.headers.Sec-Fetch-Dest=
["empty"]
request.headers.Sec-Fetch-Mode=
["cors"]
request.headers.Sec-Fetch-Site=
["same-origin"]
request.headers.User-Agent=
["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 OPR/109.0.0.0"]
request.headers.X-Forwarded-For=
["2601:644:4901:3540:ec8a:7ee3:475c:6977, 192.168.65.1"]
request.headers.X-Forwarded-Host=
["shotshare.mydomain.com"]
request.headers.X-Forwarded-Method=
["POST"]
request.headers.X-Forwarded-Port=
["443"]
request.headers.X-Forwarded-Proto=
["https"]
request.headers.X-Forwarded-Server=
["shotshare.mydomain.com"]
request.headers.X-Forwarded-Ssl=
["on"]
request.headers.X-Forwarded-Uri=
["/login"]
request.headers.X-Inertia=
["true"]
request.headers.X-Inertia-Version=
["7f56fa12c3ddf7a7b38893e2413ab719"]
request.headers.X-Original-Method=
["POST"]
request.headers.X-Original-Url=
["https://shotshare.mydomain.com/login"]
request.headers.X-Real-Ip=
["192.168.65.1"]
request.headers.X-Requested-With=
["XMLHttpRequest"]
request.headers.X-Xsrf-Token=
["eyJpdiI6Im1GR1l5a3d0NVN4N2g1Z2x1d0Nod0E9PSIsInZhbHVlIjoiYkQ3eEtXcjRTUjJsblhwNlNwRXl2a0dEYUwzcE81Smk1MWY4YWdENTVvZk1QUk9rU0M5UFJ4MG9uQk9IdGlYZXdET1loYzlGQnhKeVFPcm11RldUR1F1R1N1QUU0Mk9HQndBckVXUmNacmpUQ0VSa1lxZys3ejlNVkVoeVRxYzIiLCJtYWMiOiI5ZGQyZGUyYzYwODQ5MDlkYmE2MDRhNjc0ODhlMjAyYmE4MDMwYWFiYzI0MGQ4NjM0OTRlNzgzMDQ5YmJmNjAyIiwidGFnIjoiIn0="]
request.host=
shotshare.mydomain.com
request.method=
POST
request.proto=
HTTP/1.1
request.remote_ip=
172.19.0.27
request.remote_port=
39440
request.uri=
/login
resp_headers.Cache-Control=
["no-cache, private"]
resp_headers.Content-Encoding=
["gzip"]
resp_headers.Content-Type=
["text/html; charset=UTF-8"]
resp_headers.Date=
["Mon, 22 Apr 2024 05:17:18 GMT"]
resp_headers.Server=
["Caddy"]
resp_headers.Set-Cookie=
[]
resp_headers.Status=
["500 Internal Server Error"]
resp_headers.Vary=
["X-Inertia","Accept-Encoding"]
resp_headers.X-Powered-By=
["PHP/8.3.6"]
size=
2142
status=
500
ts=
1713763038.6053727
user_id=
04/21/2024
10:17:18 PM
127.0.0.1 -  22/Apr/2024:05:17:16 +0000 "POST /index.php" 500
04/21/2024
10:18:16 PM
127.0.0.1 -  22/Apr/2024:05:18:15 +0000 "GET /index.php" 200
04/21/2024
10:18:16 PM
bytes_read=
0
duration=
0.5858595
level=
info
logger=
http.log.access
msg=
handled request
request.client_ip=
172.19.0.27
request.headers.Accept=
["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"]
request.headers.Accept-Encoding=
["gzip, br"]
request.headers.Accept-Language=
["en-US,en;q=0.9"]
request.headers.Cache-Control=
["max-age=0"]
request.headers.Cdn-Loop=
["cloudflare"]
request.headers.Cf-Connecting-Ip=
["2601:644:4901:3540:ec8a:7ee3:475c:6977"]
request.headers.Cf-Ipcountry=
["US"]
request.headers.Cf-Ray=
["878326f25dd8f977-SJC"]
request.headers.Cf-Visitor=
["{"scheme":"https"}"]
request.headers.Connection=
["close"]
request.headers.Cookie=
[]
request.headers.Priority=
["u=0, i"]
request.headers.Sec-Ch-Ua=
[""Opera";v="109", "Not:A-Brand";v="8", "Chromium";v="123""]
request.headers.Sec-Ch-Ua-Mobile=
["?0"]
request.headers.Sec-Ch-Ua-Platform=
[""macOS""]
request.headers.Sec-Fetch-Dest=
["document"]
request.headers.Sec-Fetch-Mode=
["navigate"]
request.headers.Sec-Fetch-Site=
["same-origin"]
request.headers.Sec-Fetch-User=
["?1"]
request.headers.Upgrade-Insecure-Requests=
["1"]
request.headers.User-Agent=
["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 OPR/109.0.0.0"]
request.headers.X-Forwarded-For=
["2601:644:4901:3540:ec8a:7ee3:475c:6977, 192.168.65.1"]
request.headers.X-Forwarded-Host=
["shotshare.mydomain.com"]
request.headers.X-Forwarded-Method=
["GET"]
request.headers.X-Forwarded-Port=
["443"]
request.headers.X-Forwarded-Proto=
["https"]
request.headers.X-Forwarded-Server=
["shotshare.mydomain.com"]
request.headers.X-Forwarded-Ssl=
["on"]
request.headers.X-Forwarded-Uri=
["/login"]
request.headers.X-Original-Method=
["GET"]
request.headers.X-Original-Url=
["https://shotshare.mydomain.com/login"]
request.headers.X-Real-Ip=
["192.168.65.1"]
request.host=
shotshare.mydomain.com
request.method=
GET
request.proto=
HTTP/1.1
request.remote_ip=
172.19.0.27
request.remote_port=
55114
request.uri=
/login
resp_headers.Cache-Control=
["no-cache, private"]
resp_headers.Content-Encoding=
["gzip"]
resp_headers.Content-Type=
["text/html; charset=UTF-8"]
resp_headers.Date=
["Mon, 22 Apr 2024 05:18:16 GMT"]
resp_headers.Link=
["<https://shotshare.mydomain.com/build/assets/app-4fc500d4.css>; rel="preload"; as="style", <https://shotshare.mydomain.com/build/assets/app-543e2154.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/Login-b473878e.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/GuestLayout-a9c336ea.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/TextInput-2296ae11.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/Button-0d4eb7bb.js>; rel="modulepreload", <https://shotshare.mydomain.com/build/assets/index-ef4dc35b.js>; rel="modulepreload""]
resp_headers.Server=
["Caddy"]
resp_headers.Set-Cookie=
[]
resp_headers.Vary=
["X-Inertia","Accept-Encoding"]
resp_headers.X-Powered-By=
["PHP/8.3.6"]
size=
8143
status=
200
ts=
1713763096.1097302
user_id=
04/21/2024
10:18:21 PM
127.0.0.1 -  22/Apr/2024:05:18:21 +0000 "POST /index.php" 500
04/21/2024
10:18:21 PM
bytes_read=
87
duration=
0.23911225
level=
error
logger=
http.log.access
msg=
handled request
request.client_ip=
172.19.0.27
request.headers.Accept=
["text/html, application/xhtml+xml"]
request.headers.Accept-Encoding=
["gzip, br"]
request.headers.Accept-Language=
["en-US,en;q=0.9"]
request.headers.Cdn-Loop=
["cloudflare"]
request.headers.Cf-Connecting-Ip=
["2601:644:4901:3540:ec8a:7ee3:475c:6977"]
request.headers.Cf-Ipcountry=
["US"]
request.headers.Cf-Ray=
["87832715b86cf977-SJC"]
request.headers.Cf-Visitor=
["{"scheme":"https"}"]
request.headers.Connection=
["close"]
request.headers.Content-Length=
["87"]
request.headers.Content-Type=
["application/json"]
request.headers.Cookie=
[]
request.headers.Origin=
["https://shotshare.mydomain.com"]
request.headers.Priority=
["u=1, i"]
request.headers.Referer=
["https://shotshare.mydomain.com/login"]
request.headers.Sec-Ch-Ua=
[""Opera";v="109", "Not:A-Brand";v="8", "Chromium";v="123""]
request.headers.Sec-Ch-Ua-Mobile=
["?0"]
request.headers.Sec-Ch-Ua-Platform=
[""macOS""]
request.headers.Sec-Fetch-Dest=
["empty"]
request.headers.Sec-Fetch-Mode=
["cors"]
request.headers.Sec-Fetch-Site=
["same-origin"]
request.headers.User-Agent=
["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 OPR/109.0.0.0"]
request.headers.X-Forwarded-For=
["2601:644:4901:3540:ec8a:7ee3:475c:6977, 192.168.65.1"]
request.headers.X-Forwarded-Host=
["shotshare.mydomain.com"]
request.headers.X-Forwarded-Method=
["POST"]
request.headers.X-Forwarded-Port=
["443"]
request.headers.X-Forwarded-Proto=
["https"]
request.headers.X-Forwarded-Server=
["shotshare.mydomain.com"]
request.headers.X-Forwarded-Ssl=
["on"]
request.headers.X-Forwarded-Uri=
["/login"]
request.headers.X-Inertia=
["true"]
request.headers.X-Inertia-Version=
["7f56fa12c3ddf7a7b38893e2413ab719"]
request.headers.X-Original-Method=
["POST"]
request.headers.X-Original-Url=
["https://shotshare.mydomain.com/login"]
request.headers.X-Real-Ip=
["192.168.65.1"]
request.headers.X-Requested-With=
["XMLHttpRequest"]
request.headers.X-Xsrf-Token=
["eyJpdiI6Inl2YXBORG5LdXRpcHgxVlFCQklBM3c9PSIsInZhbHVlIjoiOTRSVHJGSHF5bkdFQzZuQ0RXSXR3cnM1RUZkNzJqemhSczFsS0szdGF4aHBjbVI2U24vM1RvZFdtOUVsMFdsYmJqQ0Q3MTl1TXhOYlFDK0EvYWJlOEJqeERmWWxxaVdDSW9pWDJDeS9YY0dsSHFTYzN6RFR0SzBENCs1ODVFcjEiLCJtYWMiOiI1ZDllZjAzODljNGI1OWI5NzQyNzkyMjI4NmFiMTlkY2Y0NzBiMjczNzliZTNmMGQyY2JkYWRjYTgzYTUyYjI1IiwidGFnIjoiIn0="]
request.host=
shotshare.mydomain.com
request.method=
POST
request.proto=
HTTP/1.1
request.remote_ip=
172.19.0.27
request.remote_port=
55116
request.uri=
/login
resp_headers.Cache-Control=
["no-cache, private"]
resp_headers.Content-Encoding=
["gzip"]
resp_headers.Content-Type=
["text/html; charset=UTF-8"]
resp_headers.Date=
["Mon, 22 Apr 2024 05:18:21 GMT"]
resp_headers.Server=
["Caddy"]
resp_headers.Set-Cookie=
[]
resp_headers.Status=
["500 Internal Server Error"]
resp_headers.Vary=
["X-Inertia","Accept-Encoding"]
resp_headers.X-Powered-By=
["PHP/8.3.6"]
size=
2142
status=
500
ts=
1713763101.3237402
user_id=

Shot visibility issue

With Require viewers to be logged in option unflagged you get a 500 server error as anonymous user.

Noticed with release 1.9.0 (latest seems to be "ouf of order" in my use cases, see #49), browser independent.

419 Page expired

I have mod_headers enabled for my Apache server and the configuration below gives me 419 Page expired when I try to use any form with the module enabled.

Is there any solution that I can use even when mod_headers is enabled? I have searched the internet for a few days and tried some possible solutions (can't remember which ones) and have now given up. Posting this issue is my "only" chance to fix this. And with "only" I mean that I haven't seen every single solution out there xD

Define E [email protected]
Define P 80004

Protocols h2 h2c http/1.1

<VirtualHost *:80>
  ServerAdmin ${E}
  ServerName img.airikr.me

  ProxyPreserveHost On
  ProxyPass / http://127.0.0.1:${P}/
  ProxyPassReverse / http://127.0.0.1:${P}/

  RewriteEngine On
  RewriteCond %{SERVER_NAME} =img.airikr.me
  RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:443>
  ServerAdmin ${E}
  ServerName img.airikr.me

  ProxyPreserveHost On
  ProxyPass / http://127.0.0.1:${P}/
  ProxyPassReverse / http://127.0.0.1:${P}/

  ErrorLog ${APACHE_LOG_DIR}/img.airikr.me.error.log

  RewriteEngine On

  SSLCertificateFile /.../img.airikr.me/fullchain.pem
  SSLCertificateKeyFile /.../img.airikr.me/privkey.pem
  Include /.../options-ssl-apache.conf
</VirtualHost>

[Enhancement] Store config in a configuration file instead of relying on environment variables

Title. I'm trying to hack together a bare metal install (instead of using docker) and while I totally can define environment variables at runtime (or in my php.ini file, or through nginx directives), I'd really rather not mess with root-owned files as much as possible. For Docker installs, it would more or less replace the .env file with some PHP variable definitions in a file named, say, config.php. I would personally model it after Nextcloud's configuration:

<?php
     $CONFIG = array (
          'HOST' => ':80`,
          'REQUIRE_HTTPS' => 'true',
     );

and so on. If you really want to keep using environment variables, the default config could probably look like this:

<?php
     $CONFIG = array (
          'HOST' => getenv( 'HOST' ),
          'REQUIRE_HTTPS' => getenv( 'REQUIRE_HTTPS' ),
     );

and so on.

Configurable max file size

After experimenting a little with various files, it looks like 2 MB is the maximum upload size. I'd like that to be configurable, though I didn't see where in the code that's actually defined (so I could be mistaken). I've made sure my nginx reverse proxy is set to accept client body sizes larger than that.

Image preview embed for Discord et. al.

Title. Many image hosts have an embed that serves the image if it's linked on a service that's capable of displaying URL previews like Discord, Twitter, etc). I don't know what would go into this from a technical standpoint but it would be nice to have.

Ability to hide/privatize uploader name

Not a priority for me, but I imagine some users may want a way to upload pseudo-anonymously (eg. they still have to log in to upload, but can hide the name of their account on the shots page).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.