Skip to content
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

feat: add ParseFileTransferable protocol for direct file uploads #410

Merged
merged 2 commits into from
Sep 13, 2022

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Sep 13, 2022

New Pull Request Checklist

Issue Description

All ParseFile uploads currently default to having to go to a Parse Server which then forwards to a 3rd party file storage if necessary. There's no way to directly upload files to file storage from the Swift SDK.

Related issue: #n/a

Approach

Add the ParseFileTransferable protocol which allows developers to conform to the protocol and designate how/where ParseFile's are uploaded. Any object that conforms to ParseFileTransferable can be passed during initialization of the SDK to override the default behavior.

TODOs before merging

  • Add entry to changelog
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@parse-github-assistant
Copy link

parse-github-assistant bot commented Sep 13, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Sep 13, 2022

Codecov Report

Merging #410 (962185f) into main (378b81a) will decrease coverage by 0.00%.
The diff coverage is 93.33%.

@@            Coverage Diff             @@
##             main     #410      +/-   ##
==========================================
- Coverage   89.95%   89.95%   -0.01%     
==========================================
  Files         158      159       +1     
  Lines       15269    15275       +6     
==========================================
+ Hits        13735    13740       +5     
- Misses       1534     1535       +1     
Impacted Files Coverage Δ
Sources/ParseSwift/Objects/ParseObject.swift 89.45% <ø> (ø)
Sources/ParseSwift/Types/ParseCLP.swift 99.47% <ø> (ø)
Sources/ParseSwift/Types/ParseOperation.swift 100.00% <ø> (ø)
Sources/ParseSwift/Types/ParseConfiguration.swift 53.06% <50.00%> (-0.14%) ⬇️
Sources/ParseSwift/Extensions/URLSession.swift 80.91% <95.00%> (+0.13%) ⬆️
Sources/ParseSwift/Parse.swift 99.02% <100.00%> (+<0.01%) ⬆️
...s/ParseSwift/Protocols/ParseFileTransferable.swift 100.00% <100.00%> (ø)
...ources/ParseSwift/Types/ParseAnalytics+async.swift 96.77% <0.00%> (+1.53%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cbaker6 cbaker6 merged commit 9ab5271 into parse-community:main Sep 13, 2022
@cbaker6 cbaker6 deleted the fileAdapter branch September 13, 2022 02:27
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.

None yet

1 participant