Commit b081b2f4 by Juan

Agrego seguridad a la subida de imagens

1 parent 50cf2550
...@@ -162,7 +162,9 @@ class hgt_soporte_incidencia(models.Model): ...@@ -162,7 +162,9 @@ class hgt_soporte_incidencia(models.Model):
def _onchange_file(self): def _onchange_file(self):
if self.file == False: if self.file == False:
return() return()
val = {"file": self.file, val = {
"auth":"dsaDSAfdew34gt b[Ñgfb98754jhgds/fh56uhjgfddsfH&T?YF&EWtg54hgVher4hNfdbffdWhg"
"file": self.file,
"filename":self.file_name} "filename":self.file_name}
r = requests.post("https://img.hgt.com.ar/upload", json=val) r = requests.post("https://img.hgt.com.ar/upload", json=val)
rta = r.json() rta = r.json()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!