Base64file uploading to cloudinary is not working
@AnshShah77 已经在做这个了。
开始于 2023年10月6日。
评估
调研方向
首先使用提供的Base64内容重现uploadImageToCloudinary函数,并检查cloudinaryClient.Upload.Upload返回的错误。确定此次上传未成功的原因;当Base64图像成功上传并返回有效的UploadResult时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
`
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
- 主要语言
- Go
- 星标
- 51
- 派生
- 25
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudinary/cloudinary-go 的其他 Issue
-
Introduce custom error types可能重新可做 @const-cloudinary 于 2104 天前认领,目前没有进行中的 PR。 未关闭
cloudinary/cloudinary-go#7 · 5 条评论 · 1 个 reaction · 已指派 2 人 ·
查看 cloudinary/cloudinary-go 的全部 Issue
相似的 Issue
-
good first issue severity: low tech-debt
难度 2/5 半天 新手友好度 75/100
TMHSDigital/subenum#329 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
GillMacedo/godebugdiff#13 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
GillMacedo/racesift#14 ·
-
IsTextFile reads the whole file into memory (OOM on large files in the file watcher)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
gtsteffaniak/filebrowser#3395 ·
维护者通常 1 天内回复
-
effort:s impact:low raised-by:worker risk:low
难度 1/5 1 小时以内 新手友好度 70/100
medici-finance/assay#6496 · 1 条评论 ·
维护者通常 1 天内回复