Skip to content
This repository was archived by the owner on Feb 11, 2026. It is now read-only.
This repository was archived by the owner on Feb 11, 2026. It is now read-only.

关于七牛云文件的上传 #9

Closed

Description

@Hjyheart

您好,看了您的代码,觉得很屌,很是震撼。但是有个小小的疑问我不是很懂。就是那个七牛云上传为什么要写三个按钮。我尝试去用正常的脑回路上传文件,发现并不行,然后抄了您的代码就可以了,我很是不解,希望您可以解答我心中的疑惑。

Activity

  1. surmon-china commented on May 2, 2017

    @surmon-china
    Owner

    你指这个吗?
    https://github.com/surmon-china/angular-admin/blob/master/src/app/theme/components/baPictureUploader/baPictureUploader.html

    其实就两个事件:

    • 删除当前图片(已上传图片)
    • 重新上传图片/或者说是上传图片
  2. Hjyheart commented on May 3, 2017

    @Hjyheart
    Author

    是 是这段代码 我不懂为什么这边要用到三个按钮 七牛云sdk绑定的那个按钮甚至都没有用 第一个按钮的点击事件只是去模拟点击第二个隐藏的按钮 就不是很懂这个逻辑 但不这么做似乎又传不上文件 就来讨教一下这个“三按钮”大法的原理

  3. surmon-china commented on May 3, 2017

    @surmon-china
    Owner

    另外,七牛云sdk提供的按钮确实没用上,而是直接调用了七牛云sdk的上传文件api。

    代码在此:https://github.com/surmon-china/angular-admin/blob/master/src/app/theme/components/baPictureUploader/baPictureUploader.component.ts#L146

  4. Hjyheart commented on May 4, 2017

    @Hjyheart
    Author

    非常感谢

  5. pinned this issue on Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions