gourcetools on Nostr: Could nostr image hosters add support for bash upload, here is a cool repo: ...
Could nostr image hosters add support for bash upload, here is a cool repo:
https://git.0x0.st/mia/0x0
https://0x0.st/
And a demo command:
```
#!/bin/bash
# Set the image file path
IMAGE_PATH="./plane.png"
# Upload the image using curl
response=$(curl -s -F "file=@$IMAGE_PATH" https://0x0.st)
# Check if the response contains "http"
if [[ $response == *"http"* ]]; then
# The response is the direct URL to the image
image_url=$response
# Print the URL of the uploaded image
echo "Image uploaded successfully. URL: $image_url"
else
echo "Image upload failed. Please try again."
fi
```
https://git.0x0.st/mia/0x0
https://0x0.st/
And a demo command:
```
#!/bin/bash
# Set the image file path
IMAGE_PATH="./plane.png"
# Upload the image using curl
response=$(curl -s -F "file=@$IMAGE_PATH" https://0x0.st)
# Check if the response contains "http"
if [[ $response == *"http"* ]]; then
# The response is the direct URL to the image
image_url=$response
# Print the URL of the uploaded image
echo "Image uploaded successfully. URL: $image_url"
else
echo "Image upload failed. Please try again."
fi
```