add generating result image to Results directory

This commit is contained in:
Alex Bezdieniezhnykh
2025-04-03 11:06:00 +03:00
parent 83ae6a0ae9
commit c9800107a6
15 changed files with 86 additions and 61 deletions
+3 -38
View File
@@ -1,45 +1,10 @@
setlocal enabledelayedexpansion
set CONFIG=%1
@echo off
set API_URL=https://api.azaion.com
set CONFIG=%1
set RESOURCES_FOLDER=%2
set EMAIL=uploader@azaion.com
set PASSWORD=Az@1on_10Upl0@der
echo %cd%
set FILE1_TO_UPLOAD=%cd%\..\Azaion.Annotator\bin\%CONFIG%\net8.0-windows\Azaion.Annotator.dll
set "FILE1_TO_UPLOAD=%FILE1_TO_UPLOAD:\=/%"
call upload-file %FILE1_TO_UPLOAD% %RESOURCES_FOLDER%
set FILE2_TO_UPLOAD=%cd%\..\Azaion.Dataset\bin\%CONFIG%\net8.0-windows\Azaion.Dataset.dll
set "FILE2_TO_UPLOAD=%FILE2_TO_UPLOAD:\=/%"
echo Logging in and retrieving token...
for /f "tokens=*" %%i in ('curl -s -X POST -H "Content-Type: application/json" ^
-d "{\"email\":\"%EMAIL%\",\"password\":\"%PASSWORD%\"}" %API_URL%/login') do set RESPONSE=%%i
for /f "tokens=2 delims=:" %%a in ('echo %RESPONSE% ^| findstr /i "token"') do (
set "TOKEN=%%a"
set "TOKEN=!TOKEN:~1,-1!"
set "TOKEN=!TOKEN:~0,-2!"
)
:: Step 2: Upload the DLL file
set UPLOAD_URL=%API_URL%/resources/%RESOURCES_FOLDER%
echo Uploading file %FILE1_TO_UPLOAD% to %UPLOAD_URL%...
curl --location %UPLOAD_URL% ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: multipart/form-data" ^
--form "data=@%FILE1_TO_UPLOAD%"
echo Uploading file %FILE2_TO_UPLOAD% to %UPLOAD_URL%...
curl --location %UPLOAD_URL% ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: multipart/form-data" ^
--form "data=@%FILE2_TO_UPLOAD%"
echo Done!
call upload-file %FILE2_TO_UPLOAD% %RESOURCES_FOLDER%