Testing s3 server on Heroku

This commit is contained in:
Patrick Fic
2020-01-14 19:00:32 -08:00
parent 68ea655ac7
commit 1d9aa8061c
4 changed files with 82 additions and 12 deletions

View File

@@ -71,17 +71,15 @@ function JobsDetailPage({ match, loading, data }) {
// Split the filename to get the name and type
let fileName = ev.file.name;
let fileType = ev.file.type;
console.log("Preparing the upload");
console.log("Preparing the upload ");
axios
.post("https://localhost:5000/sign_s3", {
fileName: fileName,
fileType: fileType
})
.post("http://localhost:5000/sign_s3")
.then(response => {
var returnData = response.data.data.returnData;
var signedRequest = returnData.signedRequest;
var url = returnData.url;
this.setState({ url: url });
setState({ url: url });
console.log("Recieved a signed request " + signedRequest);
// Put the fileType in the headers for the upload