Closed BlueSky-fur closed 8 months ago
I have no idea what zipline is, and we at Flameshot do not support anything but Imgur at this point. Also, what you imported is not Flameshot configuration. It is probably something that zipline folks have put together.
I've set file permissions and when I then try to import the config in Flameshot nothing happens,
I have no idea what you mean by "import the config". Can you send us screenshot of screen recording of what you do and what is the procedure you are going through?
I've also not seen any toggle to change where you want to upload.
there is nothing to be toggled. We do not support anything but Imgur. Maybe in future we do, but not at this point of time.
#!/bin/bash flameshot gui -r > /tmp/ss.png; curl -H "authorization: datvxxxxxxZUxxxxTY5OTEzxxxxxE5OQ" http://xxx.xxxxxxxxxxxx.xx:3000/api/upload -F file=@/tmp/ss.png -H "Content-Type: multipart/form-data" -H "Format: random" -H "Embed: true" | jq -r '.files[0]' | tr -d '\n' | pbcopy;
Is this the config you are talking about? if it is, then this is a Bash script that have been carelessly put together. Here is how you can improve it:
-H
should be --header
, the -F
should become --form
; and for Flameshot the -r
should be --raw
.>
) the output of Flameshot and save it to a file, you can ask Flameshot to write into a file directly: flameshot gui --path /blah/blah/blah.png
/tmp/
because it might collide with some other file and over-write it, and you upload a wrong file. The solution is to as your computer to create a temp file, and then use that file@
in the file path in the curl file that I don't know what it does. Perhaps that is the main cause of the error!!Here is a better version (without changing the curl part apart from updating the file path):
#!/usr/bin/env bash
# create a temp file to avoid name collision
OUR_FILE=$(mktemp)
# take the screenshot
flameshot gui --path "${OUR_FILE}"
# check if aborted
if file "${OUR_FILE}" | grep --fixed-strings "${OUR_FILE}: empty"
then
# solution taken from https://apple.stackexchange.com/a/115373/105984
display notification "Screenshot was aborted, so we don't upload!" with title "Zipline upload script"
exit 1
fi
# upload
curl -H "authorization: datvxxxxxxZUxxxxTY5OTEzxxxxxE5OQ" http://xxx.xxxxxxxxxxxx.xx:3000/api/upload \
-F file="${OUR_FILE}" \
-H "Content-Type: multipart/form-data" \
-H "Format: random" \
-H "Embed: true" \
| jq -r '.files[0]' \
| tr -d '\n' \
| pbcopy;
Does the monitor configuration matter with this issue?
No it does not. Also the link you provided does not work. It would be easier and safer if you post pictures directly into Github (just copy picture and paste inside the text box of Github)
Removed