Git Product home page Git Product logo

Comments (7)

xtyxtyx avatar xtyxtyx commented on July 26, 2024 2

I tried uploading files in Flutter web with file_picker and it works.

import 'package:minio/minio.dart';
import 'package:file_picker/file_picker.dart';
...
final pick = await FilePicker.platform.pickFiles();
final file = pick.files.single;
await minio.putObject(bucket, file.name, Stream.value(file.bytes!));

from minio-dart.

jtkeyva avatar jtkeyva commented on July 26, 2024 1

yeah i keep getting errors
[VERBOSE-2:ui_dart_state.cc(186)] Unhandled Exception: 'package:minio/src/minio.dart': Failed assertion: line 876 pos 12: 'size == null || size >= 0': is not true.

from minio-dart.

zxl777 avatar zxl777 commented on July 26, 2024

+1

from minio-dart.

ramsmart-inno avatar ramsmart-inno commented on July 26, 2024

+1

It means !!!!!

from minio-dart.

ramsmart-inno avatar ramsmart-inno commented on July 26, 2024
final pick = await FilePicker.platform.pickFiles();
final file = pick.files.single;
await minio.putObject(bucket, file.name, Stream.value(file.bytes!));

Really nerd id man with Minio. For flutter web. Thanks for revert man.

from minio-dart.

BenjiFarquhar avatar BenjiFarquhar commented on July 26, 2024

I tried uploading files in Flutter web with file_picker and it works.

import 'package:minio/minio.dart';
import 'package:file_picker/file_picker.dart';
...
final pick = await FilePicker.platform.pickFiles();
final file = pick.files.single;
await minio.putObject(bucket, file.name, Stream.value(file.bytes!));

I got my image file by other means (image_picker and image_cropper) so await minio.putObject(bucket, file.name, Stream.value(file.bytes!)); was all I needed as minio.fPutObject doesn't work on web.

from minio-dart.

FabriceACohen avatar FabriceACohen commented on July 26, 2024

I tried it and it doesn't work for me !
It push the file but end by : "XMLHttpRequest error."

from minio-dart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.