Controle de acesso a endereços IP autorizados
| Endereço IP | Nome | Adicionado em | Ações |
|---|
curl -u admin:admin -F "file=@documento.pdf" http://SEU_IP:3000/upload{
"filename": "documento.pdf",
"stored_name": "1234567890-uuid-abc123.pdf",
"size": 1024000,
"mime": "application/pdf",
"download_url": "http://SEU_IP:3000/uploads/1234567890-uuid-abc123.pdf"
}const formData = new FormData();
formData.append('file', fileInput.files[0]);
fetch('http://SEU_IP:3000/upload', {
method: 'POST',
headers: {
'Authorization': 'Basic ' + btoa('admin:admin')
},
body: formData
})
.then(r => r.json())
.then(data => {
console.log('Baixe em:', data.download_url);
});import requests
from requests.auth import HTTPBasicAuth
files = {'file': open('documento.pdf', 'rb')}
r = requests.post(
'http://SEU_IP:3000/upload',
files=files,
auth=HTTPBasicAuth('admin', 'admin')
)
data = r.json()
print('URL:', data['download_url'])http://SEU_IP:3000/uploads/NOME_DO_ARQUIVO