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

iOS network bug #35610

Closed
malacca opened this issue Dec 10, 2022 · 5 comments
Closed

iOS network bug #35610

malacca opened this issue Dec 10, 2022 · 5 comments
Labels
Platform: iOS iOS applications. Resolution: Fixed A PR that fixes this issue has been merged.

Comments

@malacca
Copy link
Contributor

malacca commented Dec 10, 2022

Description

if (partContentType != nil) {

alwasy true

need to change to

 if (![partContentType isEqual:[NSNull null]]) {

Version

all

Output of npx react-native info

none

Steps to reproduce

none

Snack, code example, screenshot, or link to a repository

none

@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Dec 10, 2022
@cortinico cortinico added the Type: Invalid This issue does not belong here. Applying this label will cause issue to be closed. label Dec 10, 2022
@malacca
Copy link
Contributor Author

malacca commented Dec 10, 2022

@cortinico

because partContentType != nil alwasy true, so file content-type will never use a custom value

fox example

const form = new FormData();
form.append('raw', {
    uri: file,
    type: 'text/plain',
    name: 'raw',
});

fetch(url, {
  method:"POST",
   body: form
})

post file type never use custom value

I don't know what else to provide, it's the obvious bug

@malacca
Copy link
Contributor Author

malacca commented Dec 10, 2022

Add some information, react-native-cameraroll set MIMEType:nil never take effect

@cortinico cortinico removed the Type: Invalid This issue does not belong here. Applying this label will cause issue to be closed. label Dec 12, 2022
@cortinico cortinico reopened this Dec 12, 2022
@cortinico
Copy link
Contributor

need to change to

 if (![partContentType isEqual:[NSNull null]]) {

Thanks for reporting this @malacca
Don't you mind sending a PR for it?

@malacca
Copy link
Contributor Author

malacca commented Dec 13, 2022

@cortinico Ok, i will sending a PR , let me test it first , make sure that it is correct,

@malacca
Copy link
Contributor Author

malacca commented Dec 26, 2022

#35640

@malacca malacca closed this as completed Dec 26, 2022
@cortinico cortinico added Resolution: Fixed A PR that fixes this issue has been merged. and removed Needs: Triage 🔍 labels Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS iOS applications. Resolution: Fixed A PR that fixes this issue has been merged.
Projects
None yet
Development

No branches or pull requests

3 participants