You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here is the code am using to upload file to my backend, and am responding json back from the backend like this res.json({status: true, message :"File Uploaded"})
here is the code am using to upload file to my backend, and am responding json back from the backend like this res.json({status: true, message :"File Uploaded"})
backgroundUpload(
${BASE_URL}/api/user/upload-media?id=${result.id}, file.uri, { fieldName: 'medias', mimeType: file.mediaType == "photo" ? "image/png" : mime.getType(file.uri), uploadType: UploadType.MULTIPART, httpMethod: 'POST', headers: { 'is_native_app': 'is_native_app', 'Content-Type': 'multipart/form-data', 'Authorization':
Bearer ${token}` } }).then((result => {
console.log(result, "ok")
const response = JSON.parse(result.body);
here is the response on Android
Object { "body": "{\"status\":true,\"message\":\"File Uploaded\"}", "headers": Object { "Access-Control-Allow-Credentials": "true", "Access-Control-Allow-Origin": "*", "Connection": "keep-alive", "Content-Length": "41", "Content-Type": "application/json; charset=utf-8", "Date": "Fri, 05 Jan 2024 17:25:51 GMT", "ETag": "W/\"29-WcVpNPZgUZEDrIUCox0kVl9B85A\"", "Expect-CT": "max-age=0", "Keep-Alive": "timeout=5", "Referrer-Policy": "no-referrer", "Strict-Transport-Security": "max-age=15552000; includeSubDomains", "Vary": "Accept-Encoding", "X-Content-Type-Options": "nosniff", "X-DNS-Prefetch-Control": "off", "X-Download-Options": "noopen", "X-Frame-Options": "SAMEORIGIN", "X-Permitted-Cross-Domain-Policies": "none", "X-XSS-Protection": "0", }, "status": 200, }
but on ios the body is not showing, its empty
Object { "body": "", "headers": Object { "Access-Control-Allow-Credentials": "true", "Access-Control-Allow-Origin": "*", "Connection": "keep-alive", "Content-Length": "41", "Content-Type": "text/html; charset=utf-8", "Date": "Fri, 05 Jan 2024 17:56:57 GMT", "Etag": "W/\"29-WcVpNPZgUZEDrIUCox0kVl9B85A\"", "Expect-CT": "max-age=0", "Keep-Alive": "timeout=5", "Referrer-Policy": "no-referrer", "Strict-Transport-Security": "max-age=15552000; includeSubDomains", "Vary": "Accept-Encoding", "X-Content-Type-Options": "nosniff", "X-DNS-Prefetch-Control": "off", "X-Download-Options": "noopen", "X-Frame-Options": "SAMEORIGIN", "X-Permitted-Cross-Domain-Policies": "none", "X-XSS-Protection": "0", }, "status": 200, }
as you can see the body is empty, which am not expecting that, it show the body on android but is not showing it on ios
The text was updated successfully, but these errors were encountered: