-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scripts for file upload #42
Conversation
d6e166c
to
3e844e1
Compare
@bismitaguha could you comment the doubts here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good till the work done.
@bismitaguha Is the issue resolved? |
@bismitaguha can you add a screenshot of the error for reference? |
This sounds like you're appending a JS object to a string. Try running the following in your browser console:
This will print Can you recheck your code for a similar pattern? |
|
Update: Bismita and I discussed this in our 1:1, and we found that this is a problem caused by the |
Update: The env problem is solved. Now I am receiving a different error I am working on this, meanwhile if anyone finds any resource please send a link. @sidvenu @abha224 |
src/components/Upload.js
Outdated
@@ -0,0 +1,73 @@ | |||
import React, { Component } from 'react' | |||
// import { postUpload } from '../actions/upload' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not necessary, remove.
src/components/Upload.js
Outdated
require('dotenv').config(); | ||
|
||
export default class Upload extends Component { | ||
constructor(props) { | ||
super(props) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A code comment here would be appropriate.
src/urls.js
Outdated
@@ -27,6 +27,10 @@ export function submission() { | |||
return `${urlBaseFrontend()}submission` | |||
} | |||
|
|||
export function file() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export function file() { | |
export function urlFileUpload() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename the references to this function too.
@sidvenu this is the sample script which will be reused in a separate component in the form responses. So this part will get deleted there completely. So right now do I need to add comments here because I will be resuing this in a different component and adding comments there makes sense maybe??? |
@bismitaguha In that case, you can copy and paste the comment as well. I feel an individual contributor should be able to understand this repo's code at all points in history, and thus comments are important no matter how redundant it would be in the future. @abha224 what do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and tested. PR looks good to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description
Fixes #11
Type of Change:
Code/Quality Assurance Only
How Has This Been Tested?
N/A
Checklist:
Code/Quality Assurance Only