Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Maria Agustina
/
hgt_soporte
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit b081b2f4
authored
2024-04-11 10:31:12 -0300
by
Juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Agrego seguridad a la subida de imagens
1 parent
50cf2550
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
models/incidencia.py
models/incidencia.py
View file @
b081b2f
...
...
@@ -162,7 +162,9 @@ class hgt_soporte_incidencia(models.Model):
def
_onchange_file
(
self
):
if
self
.
file
==
False
:
return
()
val
=
{
"file"
:
self
.
file
,
val
=
{
"auth"
:
"dsaDSAfdew34gt b[Ñgfb98754jhgds/fh56uhjgfddsfH&T?YF&EWtg54hgVher4hNfdbffdWhg"
"file"
:
self
.
file
,
"filename"
:
self
.
file_name
}
r
=
requests
.
post
(
"https://img.hgt.com.ar/upload"
,
json
=
val
)
rta
=
r
.
json
()
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment