Skip to content

Commit acf55da

Browse files
committed
setup server config for upload path; fix ui issues
1 parent a9387be commit acf55da

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

AllSpark-ios/CameraViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class CameraViewController: UIViewController, UIDocumentPickerDelegate, UINaviga
337337
stopRecording()
338338
if let image = UIImage(systemName: "stop.circle.fill") {
339339
recordButton.setImage(image, for: .normal)
340-
recordButton.tintColor = .white
340+
recordButton.tintColor = .gray
341341
} else {
342342
recordButton.setTitle("Record", for: .normal)
343343
recordButton.backgroundColor = UIColor.red.withAlphaComponent(0.7)

AllSpark-ios/SettingsView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct SettingsView: View {
1919
.padding(.top, 20)
2020

2121
Picker("Video Format", selection: $videoFormat) {
22-
Text("MP4 (Default)").tag("mp4")
22+
Text("MP4").tag("mp4")
2323
Text("MOV").tag("mov")
2424
}
2525
.pickerStyle(.segmented)

tests/perceptor-host-test/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ The server reads configuration from `config.json` in the same directory. If the
1313
```json
1414
{
1515
"hostname": "localhost",
16-
"port": 8080
16+
"port": 8080,
17+
"keyFile": "keys/test-private.key",
18+
"certFile": "keys/test-public.crt",
19+
"uploadPath": "uploads/"
1720
}
1821
```
1922

tests/perceptor-host-test/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"hostname": "localhost",
33
"port": 8080,
44
"keyFile": "keys/test-private.key",
5-
"certFile": "keys/test-public.crt"
5+
"certFile": "keys/test-public.crt",
6+
"uploadPath": "uploads/"
67
}

tests/perceptor-host-test/server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,12 @@ wss.on("connection", function connection(ws) {
182182
state.metadata = parsedMessage;
183183

184184
// Create uploads directory if it doesn't exist
185-
if (!fs.existsSync("uploads")) {
186-
fs.mkdirSync("uploads", { recursive: true });
185+
if (!fs.existsSync(config.uploadPath)) {
186+
fs.mkdirSync(config.uploadPath, { recursive: true });
187187
}
188188

189189
// Create write stream for the video file
190-
const filepath = path.join("uploads", state.metadata.filename);
190+
const filepath = path.join(config.uploadPath, state.metadata.filename);
191191
state.fileStream = fs.createWriteStream(filepath);
192192

193193
state.fileStream.on("error", (err) => {
@@ -215,7 +215,7 @@ wss.on("connection", function connection(ws) {
215215
state.receivedData = true;
216216
state.fileStream.end();
217217

218-
const filepath = path.join("uploads", state.metadata.filename);
218+
const filepath = path.join(config.uploadPath, state.metadata.filename);
219219
console.log(`File uploaded successfully: ${filepath}`);
220220
ws.send(JSON.stringify({ status: "success", message: "Video uploaded successfully" }));
221221

0 commit comments

Comments
 (0)