开发者

Uploading iWork '08 (Pages, Numbers, and Keynote) files using HTML forms

I created a form that uploads files (see below). I have tested the form and it works for all kinds of files (.pdf, .doc, etc.) but when a file from iWork '08 is selected, my submit button suddenly stops working and hence the file cannot be uploaded. When the item is replaced with another file type it works perfectly. Is there any way to fix this? I have tried it with Pages, Numbers, and Keynote files and none of them work.

This is my form:

<form enctype="multipart/form-data" action="upload-file.php" meth开发者_Go百科od="post"> 
    File to Upload: <input type="file" name="content_file">
    <input type="submit" value="Add">
</form>


iWork files are not files, they are folders. If you right-click icon you will see a menu item to view contents. This whole structure is the "file" OSX handles everything to make the behave like a file. There are many benefits to this system, but one of the few drawbacks is the issue you are seeing.

To solve this, right-click the iWork file and compress it. Update the resulting zip file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜