v1.0 - Version stable: multi-PC, détection UI-DETR-1, 3 modes exécution
- Frontend v4 accessible sur réseau local (192.168.1.40) - Ports ouverts: 3002 (frontend), 5001 (backend), 5004 (dashboard) - Ollama GPU fonctionnel - Self-healing interactif - Dashboard confiance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
88
test_upload_fixed.py
Normal file
88
test_upload_fixed.py
Normal file
@@ -0,0 +1,88 @@
|
||||
se 1)ess elf succ is.exit(0)
|
||||
syad(st_uplos = te
|
||||
succesn__":== "__mai__ meif __na False
|
||||
|
||||
eturn r ]}")
|
||||
00onse.text[:5{respRéponse: int(f" pr")
|
||||
tus_code}ponse.staeseur HTTP {rrrrint(f"❌ E p lse:
|
||||
eue
|
||||
return Tr JSON)")
|
||||
réponse non-ad réussi ( Uplo print(f"✅ xcept:
|
||||
ee
|
||||
n Tru retur
|
||||
count')}")et('events_se_data.g {responus:ments reç"Événerint(f p
|
||||
!")oad réussif"✅ Uplrint( p
|
||||
on()esponse.js = ronse_dataesp r :
|
||||
try :
|
||||
e == 200s_codsponse.statu if re
|
||||
}")
|
||||
.status_codeponsees {rtus HTTP:nt(f"Sta pri
|
||||
|
||||
timeout=30)ers, ders=heada=data, heas=files, dat fileurl,r_(serveostrequests.presponse =
|
||||
}
|
||||
token}"th_au"Bearer {: f"orizationAuth= {"ers head_id}
|
||||
n.sessiont_sessio": tesn_id"sessio data = { eam")}
|
||||
ctet-strpplication/o, f, "ated_path)ypencrbasename((os.path.": s = {"filefile as f:
|
||||
"), "rb_pathcryptedwith open(en
|
||||
oad# Upl
|
||||
|
||||
} bytes")ed_path)ypt(encrzetsipath.ges.: {oaille print(f"T")
|
||||
ed_path}{encrypté: hier chiffrint(f"Fic pr
|
||||
)
|
||||
d")
|
||||
tion_passworncryp.get("econfigsword=agent_ pasue,
|
||||
n=Tryptio enable_encr ir,
|
||||
tmpd sion,
|
||||
est_ses t ncryption(
|
||||
with_esion_zip_ create_sesypted_path = encr
|
||||
|
||||
pdir)n(tmve_jsosion.sa test_sesdir:
|
||||
as tmpory()rectoraryDiempmpfile.Twith te
|
||||
|
||||
n()n.end_sessioiot_sess
|
||||
tes"})left": "ontt"bu00, 00, "y": 2": 1ck", {"x"cliadd_event(ion.essst_s
|
||||
te
|
||||
|
||||
)1080]n=[1920, resolutioscreen_
|
||||
",est_host"ttname= hos
|
||||
x",linu platform=" ",
|
||||
t_upload"tesuser_id= te(
|
||||
sion.creaon = RawSes test_sessi
|
||||
nfig()
|
||||
_user_cog = loadconfigent_
|
||||
a
|
||||
_configload_userimport _config gent_v0.userm aion
|
||||
froypth_encron_zip_witate_sessiimport crecrypted rage_engent_v0.sto from aawSession
|
||||
ion import Rraw_sessnt_v0.rom ageée
|
||||
ffrifn chessio # Créer s)
|
||||
|
||||
:16]}..."token[oken: {auth_th tnt(f"Aupri url}")
|
||||
er_{servrver URL: nt(f"Se pri
|
||||
|
||||
_ADMIN")"RPA_TOKENs.get(env_var= h_token ")
|
||||
autRLPA_SERVER_Urs.get("R env_vaserver_url =
|
||||
trip()
|
||||
alue.s] = v()tripy.senv_vars[ke
|
||||
, 1)plit('=' = line.slue, va key in line:
|
||||
'=' h('#') andtswittare.snd not linline a if p()
|
||||
riline.st line = line in f:
|
||||
for f:
|
||||
as ", 'r')nv.localen(".ewith op {}
|
||||
s =
|
||||
env_varler .env.locarg # Cha
|
||||
|
||||
t ===")ffremenad avec chiplo"=== Test unt( pri:
|
||||
()_upload
|
||||
|
||||
def testnt_v0"))ent / "age.par__file__) str(Path(sert(0,ath.inys.p))
|
||||
sntle__).pare_fiPath(_str(.insert(0, s.patht Path
|
||||
|
||||
symporhlib im patn
|
||||
fro jsomportrequests
|
||||
i
|
||||
import fileimport tempt sys
|
||||
s
|
||||
impormport o"
|
||||
|
||||
i""iffrement.d avec chflux d'uploa complet du "Test
|
||||
""python3r/bin/env !/us#
|
||||
Reference in New Issue
Block a user