For upload, consider using [NSMutableURLRequest setHTTPBodyStream] instead of setHTTPBody
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- ios, objective-c
- Domain
- mobile
Research direction
Start by locating the iOS upload request implementation that currently assigns the upload data with setHTTPBody, then inspect how file and video uploads are constructed. Compare the existing request flow with NSMutableURLRequest's setHTTPBodyStream and determine how completion and error handling work. Done means large uploads no longer require the full payload in memory without breaking existing uploads.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Swift
- Stars
- 169
- Forks
- 107
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No 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_ios
-
Memory Leaks and Retain Cycles while using Upload with Cloudinary SDKMay be free again @adimiz1 claimed this 713 days ago, and no pull request is open. Open
cloudinary/cloudinary_ios#441 · 1 comment · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
cloudinary/cloudinary_ios#439 ·
-
Add MD5-Header option to CLDUploadRequestParamsMay be free again @adimiz1 claimed this 1458 days ago, and no pull request is open. Open
cloudinary/cloudinary_ios#390 · 1 comment · 1 assignee ·
-
Unable to upload photo, uploadPrefix, unrecognized selectorMay be free again @adimiz1 claimed this 1266 days ago, and no pull request is open. Openbug
cloudinary/cloudinary_ios#369 · 2 comments · 1 assignee ·
-
Does not compile for tvOSMay be free again @GiniAppsPartners claimed this 2026 days ago, and no pull request is open. Open
cloudinary/cloudinary_ios#337 · 1 comment · 2 assignees ·
All issues in cloudinary/cloudinary_ios
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vorssaint/vorssaint-utils#4162 ·
Maintainers usually reply within 2 days
-
cua-driver diagnose: one-line help says "install and permission report", which is macOS-specificOpen
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Opening PortKiller force-kills every cloudflared quick tunnel on the machine, not just its ownPossibly taken @widechaos claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
productdevbook/port-killer#131 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
bug mac
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
VictorKildahl/cra#445 ·
Maintainers usually reply within 1 day