How to upload image to firebase
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, react
- Domain
- frontend
Research direction
Start at the Upload component's action prop and the uploadImage function shown in the issue, then reproduce the Firebase Storage request and inspect the 501 response and localhost:3000/upload.do XML error. Done means identifying whether the failure is in this library's upload handling and documenting a confirmed resolution.
Written by the indexing model from the issue text.
Description
Hello everyone!
I've been trying to implement firebase image upload using this library from antd.
Below is a function file which goes into the action prop in <Upload /> component.
export async function uploadImage(file) {
const storage = firebase.storage()
const metadata = {
contentType: 'image/jpeg'
}
const storageRef = await storage.ref()
const imageName = generateHashName()
const imgFile = storageRef.child(`Vince Wear/${imageName}.png`)
const uploadTask = await imgFile.put(file, metadata)
return new Promise((resolve, reject) => {
return resolve(uploadTask)
})
}
I can find the uploaded images from firebase but it always returns an error and looks like firebase is returning status of 501, Odd.
And this to the console
XML Parsing Error: syntax error
Location: http://localhost:3000/upload.do
Line Number 1, Column 1:
Is this a common issue? Any way to avoid it?
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 323
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from react-component/upload
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
react-component/upload#170 ·
-
HVAC website Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
react-component/upload#697 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 15/100
react-component/upload#615 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
react-component/upload#522 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
react-component/upload#515 ·
All issues in react-component/upload
Similar issues
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/models.dev#7701 ·