Skip to content

Commit a58cffa

Browse files
author
Joe Reddington
committed
Quick important one: we needed CORS statements in upload.php for the progress bar to work
1 parent 3ca4e8d commit a58cffa

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Diff for: webinterface/upload.php

+16
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@
44
</head>
55
<body>
66
<?php
7+
8+
// header("Access-Control-Allow-Origin: *");
9+
//header("Access-Control-Allow-Headers: Content-Type");
10+
11+
12+
header("Access-Control-Allow-Origin: https://theopenvoicefactory.org");
13+
14+
// Optionally allow credentials (cookies, authentication) to be shared
15+
header("Access-Control-Allow-Credentials: true");
16+
17+
// Allow certain types of HTTP requests (e.g., GET, POST, etc.)
18+
header("Access-Control-Allow-Methods: POST, GET");
19+
20+
// Optionally allow certain headers to be received from the requests
21+
header("Access-Control-Allow-Headers: Content-Type, Authorization");
22+
723
//Basic code from http://www.w3schools.com/php/php_file_upload.asp with thanks
824
//echo getcwd() . "\n"; //Used for debugging directory
925
$target_dir = "uploads/";

0 commit comments

Comments
 (0)