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

Upload功能增强评审 #42

Closed
chestnutchen opened this issue Sep 4, 2014 · 6 comments
Closed

Upload功能增强评审 #42

chestnutchen opened this issue Sep 4, 2014 · 6 comments
Assignees

Comments

@chestnutchen
Copy link
Member

Uploader功能增强

  1. 支持在url中传递参数,将callback放到url里边去,保证后端解析multipart出错的情况下也能拿到callback

  2. 增加readonlydisable方法和状态、样式

  3. 各种中间状态可配置(可去除正在上传、上传完成等中间状态及样式)

  4. 增加撤销当前文件功能,包括置空input内容,清空Uploader对象缓存内容及状态

  5. 对后端返回的结构体增加content,type,width,height的提取

    /* success */
    {
        "success": true,
        "message": {},
        "result": {
            "previewUrl": "http://",
            "url": "http://",
            "content": "宝马,宝马新车,宝马旧车",
            "type": "auto|image|falsh",
            "width": 100,
            "height": 100
        }
    }
    
    /* failed */
    {
        "success": false,
        "message": "含有非法字符/不正确的文件类型/宽度超出限制/高度超出限制/文件大小超出限制/其他出错信息"
    }
  6. 增加extraArgsrepaint

@Justineo
Copy link
Member

Justineo commented Sep 4, 2014

返回 fail 的时候为啥要这么复杂呢,看上去只需要一个 "message": "出错信息" 就行了吧?

@Justineo
Copy link
Member

Justineo commented Sep 4, 2014

对后端返回的结构体增加content,type,width,height,size,extraInfo的提取

这个除了 type / width / content 在预览图片/Flash 的时候有用,其他的字段还能做啥处理?

@chestnutchen
Copy link
Member Author

恩,fail那个用一个简洁点~~~

@chestnutchen
Copy link
Member Author

flash的话height也要的吧,size要不就放到extra里边好了,说不定有需求呢?extra是给业务端自定义获取的,这个想法不知道对不对

@Justineo
Copy link
Member

Justineo commented Sep 4, 2014

不是,我的意思是你在控件里无法处理的内容,就不要管他是啥了,提供个接口可以在上传完成以后读到,就行了。

@Justineo
Copy link
Member

Justineo commented Sep 4, 2014

还有个需求,现在 Uploaderargs 参数没有对应的 repaint,需要增加一下。否则在初始化以后再修改 args 不会生效。

chestnutchen added a commit to chestnutchen/ma-ria that referenced this issue Sep 11, 2014
Justineo added a commit that referenced this issue Oct 8, 2014
@Justineo Justineo closed this as completed Nov 7, 2014
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