File size: 357 Bytes
850c912
 
 
 
 
 
 
 
 
2825c44
9694f56
1
2
3
4
5
6
7
8
9
10
11
#!/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