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

Added name parameter in putImageBytes #205

Merged
merged 11 commits into from
Feb 4, 2024
Merged

Conversation

noob8boi
Copy link
Contributor

@noob8boi noob8boi commented Feb 4, 2024

Overview

Please change this text to a brief statement of purpose or overview.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.

Related Issues

@natsuk4ze
Copy link
Owner

Thank you for submitting this PR @noob8boi
Do you plan to implement it on platforms other than Android? If not, I will take over the work.

@noob8boi
Copy link
Contributor Author

noob8boi commented Feb 4, 2024

Thank you for submitting this PR @noob8boi Do you plan to implement it on platforms other than Android? If not, I will take over the work.

I can try for iOS

@natsuk4ze
Copy link
Owner

natsuk4ze commented Feb 4, 2024

I can try for iOS

OK. I think you can use originalFilename in PHAssetResourceCreationOptions for

private func putMediaBytes(
  bytes: Data, album: String?, completion: @escaping (Bool, Error?) -> Void
) {
  writeContent(
    assetChangeRequest: {
      let request = PHAssetCreationRequest.forAsset()
      request.addResource(with: .photo, data: bytes, options: //HERE)
      return request
    }, album: album, completion: completion
  )
}

And mention me if you have finished the work or need help.

@noob8boi
Copy link
Contributor Author

noob8boi commented Feb 4, 2024

I can try for iOS

OK. I think you can use originalFilename in PHAssetResourceCreationOptions for

private func putMediaBytes(
  bytes: Data, album: String?, completion: @escaping (Bool, Error?) -> Void
) {
  writeContent(
    assetChangeRequest: {
      let request = PHAssetCreationRequest.forAsset()
      request.addResource(with: .photo, data: bytes, options: //HERE)
      return request
    }, album: album, completion: completion
  )
}

And mention me if you have finished the work or need help.

sure may i know whats your deadline for this? just making sure if its ok to work on it tomorrow or day after tomorrow

@natsuk4ze
Copy link
Owner

sure may i know whats your deadline for this? just making sure if its ok to work on it tomorrow or day after tomorrow

It means to add it at the opions. I just finished adding the windows platform. I have time now, can I take over the process?

@noob8boi
Copy link
Contributor Author

noob8boi commented Feb 4, 2024

sure may i know whats your deadline for this? just making sure if its ok to work on it tomorrow or day after tomorrow

It means to add it at the opions. I just finished adding the windows platform. I have time now, can I take over the process?

for sure i dont mind.. thank you!

@natsuk4ze
Copy link
Owner

for sure i dont mind.. thank you!

OK. Thanks👍

@natsuk4ze natsuk4ze merged commit c3bc64c into natsuk4ze:main Feb 4, 2024
21 checks passed
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.

Adding a name parameter in putImageBytes
2 participants