Skip to content

Implement uploading media in the Swift wrapper #715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 9, 2025
Merged

Conversation

crazytonyli
Copy link
Contributor

The majority of the diff is from MultipartForm.swift, which is copied (with a small modification) from WordPressKit.

I have added a request_id to the MediaUploadRequest struct, to make it consistent with the WpNetworkRequest: all HTTP requests should have the X-Request-Id header. This property can be useful to track media uploading progress, which will be implemented in a separate PR.

@crazytonyli crazytonyli requested review from oguzkocer and jkmassel May 8, 2025 01:12
@crazytonyli crazytonyli force-pushed the swift-upload-media branch from b2ea644 to 7d2a606 Compare May 9, 2025 01:42
Copy link
Contributor

@jkmassel jkmassel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this on macOS and iOS, and the upload was successful (along with the metadata)

@jkmassel jkmassel merged commit 1755d5d into trunk May 9, 2025
20 checks passed
@jkmassel jkmassel deleted the swift-upload-media branch May 9, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants