Base64file uploading to cloudinary is not working
@AnshShah77 is already working on this.
Since Oct 6, 2023.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
Research direction
Start by reproducing the uploadImageToCloudinary function with the supplied Base64 content and inspect the error returned by cloudinaryClient.Upload.Upload. Determine why this upload does not succeed; done means the Base64 image uploads successfully and returns a valid UploadResult.
Written by the indexing model from the issue text.
Description
`
func uploadImageToCloudinary(base64str, name string) (*uploader.UploadResult, error) {
cloudinaryURL := os.Getenv("CLOUDINARY_URL")
cloudinaryClient, err := cloudinary.NewFromURL(cloudinaryURL)
if err != nil {
return nil, err
}
formattedString := fmt.Sprintf("data:image/jpeg;base64,%s", base64str)
uploadParams := uploader.UploadParams{
PublicID: name,
UseFilename: true,
UniqueFilename: true,
}
// Upload the Base64 encoded content
result, err := cloudinaryClient.Upload.Upload(context.Background(), formattedString, uploadParams)
if err != nil {
return nil, err
}
return &result, nil
}
`
I tried to do like this and also I tried many but just not working
- Dominant language
- Go
- Stars
- 51
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 cloudinary/cloudinary-go
-
Introduce custom error typesMay be free again @const-cloudinary claimed this 2104 days ago, and no pull request is open. Open
cloudinary/cloudinary-go#7 · 5 comments · 1 reaction · 2 assignees ·
All issues in cloudinary/cloudinary-go
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
volcano-sh/volcano#6323 ·
Maintainers usually reply within 1 day
-
needs-triage typo
Difficulty 1/5 Under an hour Newbie friendliness 88/100
llm-d-incubation/llm-d-scaling-manager#122 ·
Maintainers usually reply within 1 day
-
good first issue severity: low tech-debt
Difficulty 2/5 Half a day Newbie friendliness 75/100
TMHSDigital/subenum#329 ·
Maintainers usually reply within 1 day
-
[Bug] Backend summarize min() / max() panics when a field has no numeric valuesPossibly taken @weng5e claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
grafana/grafana-infinity-datasource#1832 ·
Maintainers usually reply within 1 day
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day