Skip to content

Unable to send images using the sendFile() #17

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

Closed
Roopa77 opened this issue Sep 11, 2020 · 7 comments
Closed

Unable to send images using the sendFile() #17

Roopa77 opened this issue Sep 11, 2020 · 7 comments
Assignees
Labels
status: done This issue is considered resolved. type: bug This issue reports a bug.

Comments

@Roopa77
Copy link

Roopa77 commented Sep 11, 2020

pubnub.files.sendFile(this.currentChannel, filename, _image.readAsBytesSync()).then((value){
print(value);
});

I am sending the image file in the above way but i am getting the following error

Unhandled Exception: PubNubException: Request to third party service failed. Details: Query String Parameters not allowed on POST requests.

@are are added status: in triage This issue is being triaged. type: bug This issue reports a bug. status: in progress This issue is being worked on. and removed status: in triage This issue is being triaged. labels Sep 14, 2020
@mohanve7
Copy link

Is there any update on this?

@are
Copy link
Contributor

are commented Sep 23, 2020

Hi, the fix will be released by the end of this week.

@are are assigned are and unassigned mohitpubnub Sep 24, 2020
@are
Copy link
Contributor

are commented Sep 25, 2020

Hi there! I've released a RC version, can you please test it out and let me know if this fixes your issue?

To use the RC version, you can try changing the pubnub version to 3.0.0-rc like so:

  pubnub: 3.0.0-rc

Alternatively, change your pubnub dependency in pubspec.yaml to the following to use latest github version:

  pubnub:
    git:
      url: [email protected]:pubnub/dart.git
      ref: v3.0.0-rc

Please keep in mind, that with this new version, some imports may have changed (especially for StreamLogger or RetryPolicy) - they have been moved to separate module imports (package:pubnub/logging.dart and package:pubnub/networking.dart respectively).

Thanks for your cooperation!

@mohanve7
Copy link

mohanve7 commented Sep 26, 2020

Hi, thanks for the update... Image upload is working fine but plugin throwing a new error in subscription.dart file

subs.me = pubnub.subscribe(channels: {'${keyset.uuid}.*'}, withPresence: true);
`

[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: type 'EfficientLengthMappedIterable<String, String>' is not a subtype of type 'Set<String>'
E/flutter (21434): #0      Subscription.presenceChannels 
package:pubnub/…/subscribe/subscription.dart:37
E/flutter (21434): #1      Subscription.presence.<anonymous closure> 
package:pubnub/…/subscribe/subscription.dart:55
E/flutter (21434): #2      _WhereStream._handleData  (dart:async/stream_pipe.dart:193:24)
E/flutter (21434): #3      _ForwardingStreamSubscription._handleData  (dart:async/stream_pipe.dart:157:13)
E/flutter (21434): #4      _rootRunUnary  (dart:async/zone.dart:1198:47)
E/flutter (21434): #5      _CustomZone.runUnary  (dart:async/zone.dart:1100:19)
E/flutter (21434): #6      _CustomZone.runUnaryGuarded  (dart:async/zone.dart:1005:7)
E/flutter (21434): #7      _BufferingStreamSubscription._sendData  (dart:async/stream_impl.dart:357:11)
E/flutter (21434): #8      _DelayedData.perform  (dart:async/stream_impl.dart:611:14)
E/flutter (21434): #9      _StreamImplEvents.handleNext  (dart:async/stream_impl.dart:730:11)
E/flutter (21434): #10     _PendingEvents.schedule.<anonymous closure>  (dart:async/stream_impl.dart:687:7)
E/flutter (21434): #11     _rootRun  (dart:async/zone.dart:1182:47)
E/flutter (21434): #12     _CustomZone.run  (dart:async/zone.dart:1093:19)
E/flutter (21434): #13     _CustomZone.runGuarded  (dart:async/zone.dart:997:7)
E/flutter (21434): #14     _CustomZone.bindCallbackGuarded.<anonymous closure>  (dart:async/zone.dart:1037:23)
E/flutter (21434): #15     _rootRun  (dart:async/zone.dart:1190:13)
E/flutter (21434): #16     _CustomZone.run  (dart:async/zone.dart:1093:19)
E/flutter (21434): #17     _CustomZone.runGuarded  (dart:async/zone.dart:997:7)
E/flutter (21434): #18     _CustomZone.bindCallbackGuarded.<anonymous closure>  (dart:async/zone.dart:1037:23)
E/flutter (21434): #19     _microtaskLoop  (dart:async/schedule_microtask.dart:41:21)
E/flutter (21434): #20     _startMicrotaskLoop  (dart:async/schedule_microtask.dart:50:5)

`

@are
Copy link
Contributor

are commented Sep 28, 2020

Hi there! I've uploaded a fix, can you try updating the pubnub dependency version to 3.0.0-rc.1 and let me know if its fixed for you? Thanks!

@mohanve7
Copy link

mohanve7 commented Oct 1, 2020

Thanks! its working

@are are added status: done This issue is considered resolved. and removed status: in progress This issue is being worked on. labels Oct 8, 2020
@are
Copy link
Contributor

are commented Oct 8, 2020

Fixed in v3.0.0.

@are are closed this as completed Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: done This issue is considered resolved. type: bug This issue reports a bug.
Projects
None yet
Development

No branches or pull requests

4 participants