我需要能够上传任何文件类型,例如PDF和JPEG。 S3中要求的内容类型设置为上载的时间,或该文件将不会被正确送达
I need to be able to upload any file type, for example, both pdf and jpeg. S3 requires the content-type be set at the time of upload, or the file will not be served correctly
是否可以动态分配的内容类型,在调用onSelect回调或其他地方?
Is it possible to dynamically assign the content-type in the onSelect callback or elsewhere?
的内容类型在POSTDATA参数设置为uploadify(scriptData中老年uploadify版本)。现在我没有办法来设置,直到一个文件被选中。当文件被选中,我可以决定(主要是准确的)内容类型的文件扩展名。现在所有的文件被当作application /八位字节流,这使得他们pretty的没用。
The content-type is set in the postData parameter to uploadify (scriptData in older uploadify versions). Right now I have no way to set this until a file is selected. After the file is selected I could determine (mostly accurately) the content-type from the file extension. Now all files are served as application/octet-stream, which makes them pretty useless.
您可以通过对象复制到自己设置包括内容类型现有S3对象
的元数据并指定新的数据。
You can set the metadata including content-type
of an existing S3 object by copying the object to itself and specifying the new data.
上一篇:Ruby和亚马逊S3如何打开文件,并进行身份验证?亚马逊、身份验证、文件、Ruby
下一篇:轨道3,Heroku的,AWS-S3,无非是想将文件上载到张贴(HTTP /多部分),以我们的应用程序S3无非是、想将、应用程序、轨道