For upload, consider using [NSMutableURLRequest setHTTPBodyStream] instead of setHTTPBody
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- ios, objective-c
- 领域
- mobile
调研方向
首先找到当前使用 setHTTPBody 分配上传数据的 iOS 上传请求实现,然后检查文件和视频上传是如何构造的。将现有请求流程与 NSMutableURLRequest 的 setHTTPBodyStream 进行比较,并确定完成处理和错误处理的工作方式。完成的标准是:大文件上传不再需要将完整 payload 保存在内存中,同时不破坏现有上传功能。
由索引模型根据 Issue 内容生成。
描述
Hi there,
I wanted to make a quick suggestion.
Cloudinary can use a significant amount of memory, particularly when uploading videos or large photos because image/video data must be fully loaded into RAM before being sent over the wire.
It looks as though NSMutableURLRequest supports setting an body stream instead of data.
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url];
NSInputStream *stream = [[NSInputStream alloc] initWithFileAtPath:filePath];
[request setHTTPBodyStream:stream];
This might be something worth looking into to reduce Cloudinary's memory footprint.
Thanks,
Martin
- 主要语言
- Swift
- 星标
- 169
- 派生
- 107
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudinary/cloudinary_ios 的其他 Issue
-
Memory Leaks and Retain Cycles while using Upload with Cloudinary SDK可能重新可做 @adimiz1 于 713 天前认领,目前没有进行中的 PR。 未关闭
cloudinary/cloudinary_ios#441 · 1 条评论 · 已指派 1 人 ·
-
难度 5/5 一周以上 新手友好度 20/100
cloudinary/cloudinary_ios#439 ·
-
Add MD5-Header option to CLDUploadRequestParams可能重新可做 @adimiz1 于 1458 天前认领,目前没有进行中的 PR。 未关闭
cloudinary/cloudinary_ios#390 · 1 条评论 · 已指派 1 人 ·
-
Unable to upload photo, uploadPrefix, unrecognized selector可能重新可做 @adimiz1 于 1266 天前认领,目前没有进行中的 PR。 未关闭bug
cloudinary/cloudinary_ios#369 · 2 条评论 · 已指派 1 人 ·
-
Does not compile for tvOS可能重新可做 @GiniAppsPartners 于 2026 天前认领,目前没有进行中的 PR。 未关闭
cloudinary/cloudinary_ios#337 · 1 条评论 · 已指派 2 人 ·
查看 cloudinary/cloudinary_ios 的全部 Issue
相似的 Issue
-
cua-driver diagnose: one-line help says "install and permission report", which is macOS-specific未关闭
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
easy
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 5 天内回复
-
15-minutes 5-minutes algorithm any-language beginner-friendly c cpp csharp easy go good first issue hacktoberfest help wanted java javascript kotlin python rust swift typescript
难度 1/5 1 小时以内 新手友好度 68/100
Huerte/algo-solutions-python#260 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100