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