diff --git a/.github/workflows/generator-linux.yml b/.github/workflows/generator-linux.yml index b42253b..6b0a53e 100644 --- a/.github/workflows/generator-linux.yml +++ b/.github/workflows/generator-linux.yml @@ -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' diff --git a/rdgenerator/views.py b/rdgenerator/views.py index d5a6b39..e405314 100644 --- a/rdgenerator/views.py +++ b/rdgenerator/views.py @@ -334,14 +334,4 @@ def save_png(file, uuid, domain): imageJson['uuid'] = uuid 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!") \ No newline at end of file + return json.dumps(imageJson) \ No newline at end of file