aliyun / aliyun-oss-react-native

MIT License
148 stars 100 forks source link

什么时候出flutter 版 #34

Open jlcool opened 5 years ago

jlcool commented 5 years ago

什么时候出flutter 版

luozhang002 commented 5 years ago

@jlcool 团队已经有小伙伴开始调研。

Liangqianyong commented 5 years ago

flutter 版本的sdk 出了吗

luozhang002 commented 5 years ago

@Liangqianyong 出一整套的方案的话,成本太高,有个基于postobject的flutter sdk你可以参考下。https://github.com/luozhang002/postflutter-demo

此外网上也有第三方用户开发了一个 flutteross插件,也可以参考下。 https://github.com/jlcool/aliossflutter

linguitang commented 5 years ago

@luozhang002 其实官方可以根据android和ios的官方sdk,出一个flutter插件就好了

chenjianjun571 commented 5 years ago

官方什么时候出flutter插件库呀?大势所趋,阿里云能不能跟上时代的步伐呀

Stuazt commented 4 years ago

还是没有flutter库啊,https://github.com/jlcool/aliossflutter ,这个不够强壮,感觉作者并没有在生产环境中使用,不然也不会那么多bug。。。作者也好久没维护了。

jlcool commented 4 years ago

@luozhang002 官方出一个吧,我都不会原生开发,插件不好维护

quanzaiyu commented 4 years ago

flutter我试过, 使用 dio 可以很容易地上传到oss, 封装的部分代码如下:

  oss(File file) async {
    var ext = file.path.split('.').last;
    var userId = (await Storage.get('userInfo'))['id'].toString();
    var now = (new DateTime.now()).toString();
    var uuid = new Uuid();
    var filename = uuid.v5(Uuid.NAMESPACE_URL, now + userId);

    // 签名
    FormData data = new FormData.from({
      'Filename': '文件名,随意',
      'key' : "$uploadBaseUrl/$filename.$ext",
      'policy': policyBase64,
      'OSSAccessKeyId': accesskeyId,
      'success_action_status' : '200', //让服务端返回200,不然,默认会返回204
      'signature': signature,
      'file': new UploadFileInfo(file, "imageFileName")
    });

    try {
      Response response = await dio.post(ossPath, data: data);
      var uploadPath = "$ossPath/$uploadBaseUrl/$filename.$ext";
      print(response);
      print("上传成功: $uploadPath");
      return uploadPath;
    } on DioError catch(e) {
      print("上传失败: $e");
    }
  }
vinurs commented 4 years ago

闲鱼团队不是一直在跟进flutter技术么?官方出一个应该不难啊

JohnnyB0Y commented 4 years ago

https://pub.dev/packages/aly_oss 这个是不是官方的?

debugksir commented 4 years ago

@luozhang002 这么多人提需求,出个flutter sdk吧!

DingXuefeng commented 3 years ago

+1 求flutter版

saviourdog commented 3 years ago

+1 求flutter版

figureai commented 3 years ago

+1 求flutter版

ixugo commented 1 year ago

+1 求flutter版

hello-nico-chan commented 1 year ago

+1 求flutter版