This commit is contained in:
Bryan Gerlach
2024-10-11 14:27:44 -05:00
parent 2164f6af61
commit ff26523be5
2 changed files with 7 additions and 12 deletions

View File

@@ -289,7 +289,6 @@ jobs:
sed -i -e '/const KEY:/,/};/d' ./src/common.rs
sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
echo -n "${{ env.CUSTOM }}" | cat > ./custom.txt
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./build.py" ${{ secrets.GENURL }}/save_custom_client
- name: fix connection delay
continue-on-error: true
@@ -298,6 +297,12 @@ jobs:
run: |
sed -i -e '/if !key.is_empty() && !token.is_empty() {/,/}/d' ./src/client.rs
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: build.py
path: |
./build.py
- name: Restore bridge files
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'

View File

@@ -335,13 +335,3 @@ def save_png(file, uuid, domain):
imageJson['file'] = file.name
#return "%s/%s" % (domain, file_save_path)
return json.dumps(imageJson)
def save_custom_client(request):
file = request.FILES['file']
file_save_path = "clients/custom/%s" % file.name
Path("clients/custom").mkdir(parents=True, exist_ok=True)
with open(file_save_path, "wb+") as f:
for chunk in file.chunks():
f.write(chunk)
return HttpResponse("File saved successfully!")