MinecraftServer / upload.sh
YoBatM's picture
Update upload.sh
5666514 verified
raw
history blame contribute delete
356 Bytes
#!/bin/bash
# Verificar si se pasaron los archivos de entrada y salida como parámetros
if [ $# -ne 2 ]; then
echo "Uso: $0 archivo_de_entrada json_url"
exit 1
fi
archivo_entrada="$1"
url="$2"
curl -s -i -X "PUT" -d "{\"file\":\"$(cat $archivo_entrada | base64)\"}" -H "Content-Type: application/json" -H "Accept: application/json" $url>/dev/null