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

Need a way to upload binary data #2327

Closed
Aruljebaraj opened this issue Nov 12, 2024 · 1 comment
Closed

Need a way to upload binary data #2327

Aruljebaraj opened this issue Nov 12, 2024 · 1 comment

Comments

@Aruljebaraj
Copy link

Package

dio

Version

5.7.0

Operating-System

Android, iOS, Windows

Adapter

Default Dio

Output of flutter doctor -v

[!] Flutter (Channel stable, 3.24.1, on macOS 15.0.1 24A348 darwin-arm64, locale en-AU)
    • Flutter version 3.24.1 on channel stable at /Users/arul/Flutter/flutter
    ! The flutter binary is not on your path. Consider adding /Users/arul/Flutter/flutter/bin to your path.
    ! The dart binary is not on your path. Consider adding /Users/arul/Flutter/flutter/bin to your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5874a72aa4 (3 months ago), 2024-08-20 16:46:00 -0500
    • Engine revision c9b9d5780d
    • Dart version 3.5.1
    • DevTools version 2.37.2
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/arul/Library/Android/sdk
    • Platform android-34, build-tools 33.0.1
    • ANDROID_HOME = /Users/arul/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/arul/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.84.2)
    • VS Code at /Users/arul/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.100.0

[✓] Connected device (4 available)
    • Saurabh’s iPa (mobile)          • 00008103-001D29EC267B001E • ios            • iOS 17.4.1 21E236
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 15.0.1 24A348 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 15.0.1 24A348 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 130.0.6723.117

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Dart Version

No response

Steps to Reproduce

I was trying to send binary form of data though I was getting 400
need a way to upload binary data
I didn't find any solution so for particular thing I had to use http library
like eg :
Response response = await client.put( Uri.parse(Url), body: File(imageBaseCode.path).readAsBytesSync(), );
let me know even if we have any solution to this......

Expected Result

Should able to upload the file

Actual Result

Throws error

@Aruljebaraj Aruljebaraj added h: need triage This issue needs to be categorized s: bug Something isn't working labels Nov 12, 2024
@AlexV525
Copy link
Member

https://www.google.com/search?q=dio+upload+bytes

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2024
@AlexV525 AlexV525 added i: stackoverflow and removed h: need triage This issue needs to be categorized s: bug Something isn't working labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants