Skip to content

Commit 46f1ff4

Browse files
Added pyinstaller stuff and changed server url
1 parent e637089 commit 46f1ff4

File tree

4 files changed

+54
-2
lines changed

4 files changed

+54
-2
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.env
22
venv/
3-
.idea/
3+
.idea/
4+
dist/
5+
build/

RadmashUploader.spec

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- mode: python ; coding: utf-8 -*-
2+
3+
4+
block_cipher = None
5+
6+
7+
a = Analysis(
8+
['client.py'],
9+
pathex=[],
10+
binaries=[],
11+
datas=[],
12+
hiddenimports=[],
13+
hookspath=[],
14+
hooksconfig={},
15+
runtime_hooks=[],
16+
excludes=[],
17+
win_no_prefer_redirects=False,
18+
win_private_assemblies=False,
19+
cipher=block_cipher,
20+
noarchive=False,
21+
)
22+
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
23+
24+
exe = EXE(
25+
pyz,
26+
a.scripts,
27+
a.binaries,
28+
a.zipfiles,
29+
a.datas,
30+
[],
31+
name='RadmashUploader',
32+
debug=False,
33+
bootloader_ignore_signals=False,
34+
strip=False,
35+
upx=True,
36+
upx_exclude=[],
37+
runtime_tmpdir=None,
38+
console=False,
39+
disable_windowed_traceback=False,
40+
argv_emulation=False,
41+
target_arch=None,
42+
codesign_identity=None,
43+
entitlements_file=None,
44+
icon=['logo.ico'],
45+
)

client.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
import requests
44
from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, \
55
QPushButton, QFileDialog, QMessageBox
6+
from dotenv import load_dotenv
7+
8+
import os
9+
load_dotenv()
610

711

812
class FileEntryWidget(QWidget):
@@ -90,7 +94,8 @@ def upload_files(self):
9094

9195
data = {f'title_{i + 1}': title for i, (_, _, title) in enumerate(file_entries_data)}
9296

93-
response = requests.post('http://localhost:8080/upload', files=files, data=data)
97+
server_url = os.getenv('SERVER_URL')
98+
response = requests.post(server_url + '/upload', files=files, data=data)
9499

95100
if response.status_code == 200:
96101
QMessageBox.information(self, "Success", "Files uploaded successfully")

logo.ico

211 KB
Binary file not shown.

0 commit comments

Comments
 (0)