WWWForm.AddBinaryData 添加二进制数据

function AddBinaryData (fieldName : string, contents : byte[], fileName : string = null, mimeType : string = null) : void

Description描述

Add binary data to the form.

添加二进制数据到表单。

Use this function to upload files and images to a web server application. Note that the data is read from the contents of byte array and not from a file. The fileName parameter is for telling the server what filename to use when saving the uploaded file.

使用这个函数上传文件和图片到web服务器,注意数据从字节数组中读取内容而不是从一个文件中读取。fileName参数用来告诉服务器用什么文件名来保存上传的文件。

If mimeType is not given and first 8 bytes of the data match PNG format header, then the data is sent with "image/png" mimetype. Otherwise it is sent with "application/octet-stream" mimetype.

如果mimeType没有给出,并且数据的前8字节与PNG格式头相同,然后数据用"image/png"mimetype发送,否则它将用"application/octet-stream"mimetype发送。

Page last updated: 2011-3-19