【发布时间】:2011-03-08 03:54:59
【问题描述】:
我需要能够上传任何文件类型,例如 pdf 和 jpeg。 S3 要求在上传时设置 content-type,否则文件将无法正确提供
是否可以在 onSelect 回调或其他地方动态分配内容类型?
在 postData 参数中将 content-type 设置为 uploadify(旧 uploadify 版本中的 scriptData)。现在,在选择文件之前,我无法设置它。选择文件后,我可以(大部分准确)从文件扩展名中确定内容类型。现在所有文件都作为 application/octet-stream 提供,这使得它们毫无用处。
【问题讨论】: