Skip to content

Commit

Permalink
receipt path modification
Browse files Browse the repository at this point in the history
  • Loading branch information
qwwcoco committed Oct 21, 2022
1 parent 70a27a2 commit 2cb3f93
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions BACKEND/controllers/dataController.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const addData = async (req, res, next) => {
const file = req.file;
if(file){
//convert images into base 64 encoding
const img = fs.readFileSync("uploads/" + file.filename);
const img = fs.readFileSync("./uploads/" + file.filename);
encode_image = img.toString('base64');

//create object to store data in the collection
Expand Down Expand Up @@ -110,7 +110,7 @@ const editData = async (req, res, next) => {
const file = req.file;
if(file){
//convert images into base 64 encoding
const img = fs.readFileSync("uploads/" + file.filename);
const img = fs.readFileSync("./uploads/" + file.filename);
encode_image = img.toString('base64');

//create object to store data in the collection
Expand Down
4 changes: 2 additions & 2 deletions BACKEND/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ app.use(passport.initialize());
const cors = require('cors');
const corsOptions = {
credentials:true,
origin:'https://recordit123.netlify.app',
//origin:'http://localhost:3000',
//origin:'https://recordit123.netlify.app',
origin:'http://localhost:3000',
optionsSuccessStatus:220,
};
app.use(cors(corsOptions));
Expand Down
4 changes: 2 additions & 2 deletions start_page/src/api/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ import axios from 'axios';
* Variable Accessed:
*/
export default axios.create({
//baseURL: 'http://localhost:8080'
baseURL: 'https://recordit123.herokuapp.com/'
baseURL: 'http://localhost:8080'
//baseURL: 'https://recordit123.herokuapp.com/'
});

0 comments on commit 2cb3f93

Please sign in to comment.