Open Ramkrishnank opened 5 years ago
Do you have more information? Logs about bytes send or any project to reproduce the problem?
Image format (jpg/png) are uploading successfully but the thing is Video and File(PDF,Docx) is not uploading even client is not hitting the API and i didnt getting the any error and log
is there any other plugin to upload the files and video in native-script
JS: { JS: "eventName": "progress", JS: "object": { JS: "_observers": { JS: "progress": [ JS: {} JS: ], JS: "error": [ JS: {} JS: ], JS: "responded": [ JS: {} JS: ], JS: "complete": [ JS: {} JS: ] JS: }, JS: "_session": { JS: "_id": "file-upload" JS: }, JS: "_id": "file-upload{2}", JS: "_description": ".jpg", JS: "_upload": 173, JS: "_totalUpload": 32846, JS: "_status": "uploading" JS: }, JS: "currentBytes": 173, JS: "totalBytes": 32846 JS: } JS: { JS: "eventName": "progress", JS: "object": { JS: "_observers": { JS: "progress": [ JS: {} JS: ], JS: "error": [ JS: {} JS: ], JS: "responded": [ JS: {} JS: ], JS: "complete": [ JS: {} JS: ] JS: }, JS: "_session": { JS: "_id": "file-upload" JS: }, JS: "_id": "file-upload{2}", JS: "_description": ".jpg", JS: "_upload": 32846, JS: "_totalUpload": 32846, JS: "_status": "uploading" JS: }, JS: "currentBytes": 32846, JS: "totalBytes": 32846 JS: } JS: { JS: "eventName": "progress", JS: "object": { JS: "_observers": { JS: "progress": [ JS: {} JS: ], JS: "error": [ JS: {} JS: ], JS: "responded": [ JS: {} JS: ], JS: "complete": [ JS: {} JS: ] JS: }, JS: "_session": { JS: "_id": "file-upload" JS: }, JS: "_id": "file-upload{2}", JS: "_description": ".jpg", JS: "_upload": 32846, JS: "_totalUpload": 32846, JS: "_status": "complete" JS: }, JS: "currentBytes": 32846, JS: "totalBytes": 32846 JS: } JS: { JS: "eventName": "responded", JS: "object": { JS: "_observers": { JS: "progress": [ JS: {} JS: ], JS: "error": [ JS: {} JS: ], JS: "responded": [ JS: {} JS: ], JS: "complete": [ JS: {} JS: ] JS: }, JS: "_session": { JS: "_id": "file-upload" JS: }, JS: "_id": "file-upload{2}", JS: "_description": ".jpg", JS: "_upload": 32846, JS: "_totalUpload": 32846, JS: "_status": "complete" JS: }, JS: "data": "{\"fileByte\":\"\",\"trackID\":100050086668244,\"category\":null,\"fileName\":\"IMG_20191021_123452.jpg\",\"fileSize\":0.084144}", JS: "responseCode": 200 JS: } JS: { JS: "eventName": "complete", JS: "object": { JS: "_observers": { JS: "progress": [ JS: {} JS: ], JS: "error": [ JS: {} JS: ], JS: "responded": [ JS: {} JS: ], JS: "complete": [ JS: {} JS: ] JS: }, JS: "_session": { JS: "_id": "file-upload" JS: }, JS: "_id": "file-upload{2}", JS: "_description": ".jpg", JS: "_upload": 32846, JS: "_totalUpload": 32846, JS: "_status": "complete" JS: }, JS: "responseCode": 200, JS: "response": {} JS: }
**JS: Selected Videos JS: Image File selected JS: Image File selected /storage/emulated/0/DCIM/VID_20191021_123529.mp4
JS: Compressed File path /data/user/0/com.myDemo.app/files/VID_20191021_123529.mp4 JS: /data/user/0/com.myDemo.app/files/VID_20191021_123529.mp4 JS: /data/user/0/com.myDemo.app/files/VID_20191021_123529.mp4 JS: Stream Insert Started JS: Selected Videos JS: Image File selected JS: Image File selected /storage/emulated/0/DCIM/VID_20191021_123529.mp4 JS: Came to Compress Image block JS: Compressed File path /data/user/0/com.myDemo.app/files/VID_20191021_123529.mp4 JS: /data/user/0/com.myDemo.app/files/VID_20191021_123529.mp4 JS: /data/user/0/com.myDemo.app/files/VID_20191021_123529.mp4 JS: Stream Insert Started JS: Selected Videos JS: Image File selected JS: Image File selected /storage/emulated/0/DCIM/VID_20191021_123529.mp4 JS: Came to Compress Image block JS: Compressed File path /data/user/0/com.myDemo.app/files/VID_20191021_123529.mp4 JS: /data/user/0/com.myDemo.app/files/VID_20191021_123529.mp4 JS: /data/user/0/com.myDemo.app/files/VID_20191021_123529.mp4**
task = session.multipartUpload(params, request); i didnt received any error after this line even console.log also not hitting
Hi Team @hdeshev @EmilStoychev @jbristowe @romulowspp @NathanaelA
My client app is not hitting API and i didn't get any error both run and compile time error : even i uploading Files ,Images,Video,please help me to resolve this error
My API is working fine i checked from some other application
iOS/Android/Both
iOS/Android versions
emulator or device. What type of device?
CLI: 5.2.1
Cross-platform modules: 5.2.1
Runtime(s): Android (5.2.1)
Plugin(s): nativescript-background-http
dependencies
{ "nativescript": { "id": "com.demo.sample", "tns-ios": { "version": "5.2.0" }, "tns-android": { "version": "5.2.1" } }, "description": "sample Application", "license": "SEE LICENSE IN",
"repository": "",
"scripts": {
"lint": "tslint \"src/*/.ts\""
},
"dependencies": {
"@angular/animations": "^7.2.0",
"@angular/common": "^7.2.0",
"@angular/compiler": "^7.2.12",
"@angular/core": "^7.2.13",
"@angular/forms": "^7.2.0",
"@angular/http": "^7.1.0",
"@angular/platform-browser": "^7.2.0",
"@angular/platform-browser-dynamic": "^7.2.0",
"@angular/router": "^7.2.0",
"file-system": "^2.2.2",
"nativescript-android-utils": "^1.0.2",
"nativescript-angular": "^7.2.1",
"nativescript-background-http": "^4.2.0",
"nativescript-camera": "^4.5.0",
"nativescript-checkbox": "^3.0.3",
"nativescript-drop-down": "^5.0.2",
"nativescript-mediafilepicker": "^2.0.17",
"nativescript-modal-datetimepicker": "^1.2.0",
"nativescript-ng-ripple": "^2.0.1",
"nativescript-pdf-view": "^2.0.1",
"nativescript-phone": "^1.4.0",
"nativescript-snackbar": "^4.1.2",
"nativescript-theme-core": "^1.0.4",
"nativescript-ui-listview": "^6.0.0",
"nativescript-ui-sidedrawer": "^5.1.0",
"reflect-metadata": "^0.1.12",
"rxjs": "^6.3.0",
"tns-core-modules": "~5.2.0",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular/compiler-cli": "^7.2.0",
"@nativescript/schematics": "^0.5.0",
"@ngtools/webpack": "^7.2.0",
"codelyzer": "^4.5.0",
"nativescript-dev-sass": "^1.6.0",
"nativescript-dev-typescript": "^0.8.0",
"nativescript-dev-webpack": "^0.24.1",
"tslint": "^5.11.0"
},
"gitHead": "f548ec926e75201ab1b7c4a3a7ceefe7a4db15af",
"readme": "NativeScript Application"
}
here is my code import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import * as bgHttp from "nativescript-background-http"; import { Subject } from 'rxjs';
import { ApplicationSetting, ApplicationSettingService, CommonService } from './index.service'; import { HttpStatus } from './enumtype';
import { MSG_BadRequest, MSG_SuccessFileUpload } from './messages'; import { error } from '@angular/compiler/src/util';
@Injectable() export class AttachmentService {
}