上载后PDF文件损坏,但可以进行本地复制.这怎么可能发生? [英] PDF file damaged after upload but local copy is fine. How could this be happening?

查看:147
本文介绍了上载后PDF文件损坏,但可以进行本地复制.这怎么可能发生?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个pdf文件,我正在将其上传到服务器.我可以通过浏览器打开本地版本,并且可以正常打开,但是当我将其上传到服务器并尝试直接从那里打开时,我得到一个:

I have a pdf file which I am uploading to my server. I can open the local version through my browser and it opens fine, but when I upload it to the server and try to open it directly through there then I get a:

文件已损坏,无法修复消息.

The file is damaged and could not be repaired message.

同样,如果我将服务器上的许多pdf文件之一下载到本地计算机,则在打开它们时总会出现一些错误,或者它们是空白的.

Likewise, if I download one of the many pdf's on my server to my local computer, then there is always now some error in opening them or they are blank.

我正在使用FileZilla通过ftp上传和下载文件.

I am using FileZilla to upload and download the files by ftp.

这种情况才刚刚开始,我不确定为什么.我有pdf的备份目录,并已用备份复制并替换了所有文件,以解决此问题.现在,我可以在地址栏中键入文件位置,并像查看那样查看它们,这是一项改进,但是,如果尝试下载它们,则会出现某种错误,这意味着我无法查看它们.

This situation has only just started and I'm not sure why. I have a backup directory of the pdf's and have copied and replaced all the files with the backups in an effort to fix the issue. I am now able to type the file location into the address bar and view them like that which is an improvement, but if I try and download them, then I get some sort of error which means I can't view them.

为什么会发生这种情况?

Any ideas why this could be happening?

非常感谢

推荐答案

将FileZilla的文件传输模式设置为binary ASCII似乎可以解决问题.

Setting FileZilla's file transfer mode to binary and not ASCII seems to have done the trick.

这篇关于上载后PDF文件损坏,但可以进行本地复制.这怎么可能发生?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆