Jump to content

(Solved) Download files corrupt after FTP upload


Recommended Posts

Hi,

 

Can anybody help! I backed up my website using FTP prior to trying an upgrade. The upgrade didn't work so i restored my website using FTP. The website it's self works fine; however when i buy a virtual product and then download it it tells me the file is corrupt when i try and open it.

I can re upload the virtual file manually on the product page and it then works ok. Only problem is i have over 250 virtual products and don't want to have to do them all one by one.

 

Why have all the download file become corrupt after the FTP upload/download process? and can i fix it easily?

 

Any help gratefully received.

Edited by Alt100 (see edit history)
Link to comment
Share on other sites

I've tried to upload the files again and i still get the same error.

 

"Windows cannot open file"

"The compressed folder C:/......./ is invalid"

 

I've read a few of the other posts and found some similar problems but can't find what people did to solve it. I think i read someone changed the get-file.php but not sure what they changed.

 

can anybody help or will i have to upload all of my download files one by one on the product pages. This defeats the point of backing up in the first place.

Link to comment
Share on other sites

hey

 

you said, that you downloaded all files from your FTP, these files work well on your PC ?

 

then you uploaded it to your remote server - and when someone download the file - it isn't working.

 

Please, try to download file once again but via filezilla, it is possible to open it?

Link to comment
Share on other sites

All of the other prestashop files are ok it's just the virtual product files in the download folder.

 

When the customer downloads them they say they are invalid. (only after i've downloaded and upload via Filezilla)

 

They are zip files when i upload them on the product page and they get renamed in the download folder to a long string of letter/numbers (not a zip file)

 

I've tried to rename one to "test.zip" that i had stored in the backups on my pc and then tried to open it and it still says it's invalid.

 

In my mind it means they either got damaged during FTP download or something needs to be done when renaming them.

 

It's looking likely i'll have to upload all my virtual product files one by one.

 

This is not ideal for the future as it means i have no reliable way to backup/restore my website without getting invalid product files.

Link to comment
Share on other sites

Hi all,

 

Many thanks for replies to the post. I've now solved the problem.

 

It was all down to transfer type setting in Filezilla, i had it set to "Auto", to solve the problem and prevent the download files getting corrupted you have set this to "Binary".

 

There are a lot of other people who have had similar problems with this. Just google "Filezilla corrupting files" and you find the technical reasons behind it.

 

Hope this helps anyone else in the future.

Link to comment
Share on other sites

  • 4 months later...

Hi there,

 

I have searched for answers for a long time, and this thread is the only one that describes virtual files to become corrupted after upload.

 

I have the same issue: files that have been uploaded through Fetch (the Mac FTP program) but also through the standard Prestashop upload function in the Catalog product page, become corrupted.

 

At first I thought it had to do with the Fetch settings, but as files also become corrupt through upload within Prestashop, I am now a bit in the dark about the cause! Video files that are uploaded into Prestashop, are corrupt upon download and therefore customers cannnot play these files in all major video players (VLC, Quicktime, Windows media etc.)

 

Do you guys have any suggestions on how to solve this?

Link to comment
Share on other sites

Hi guys,

 

I have looked further into this and have found the following:

 

1) if I upload a downloadable product file through Prestashop (in the browser) the file uploads fine, but after retrieving it, it is corrupted (as in: it doesn't open in any video player).

 

2) if I use FTP to upload to any other folder than the 'download' folder, the video file remains intact.

 

3) If I access the uploaded file in the Download folder, which has an encrypted name, and I retrieve this file and add the extension .mp4 to it, the file opens without error.

 

I can therefore only conclude that something goes wrong in the process where a customer downloads a video file after purchase; it comes from the download folder and the encrypted filename is being restored to the original file name + the mp4 extension. But for some strange reason, this process results in an unplayable video file for the customer.

 

Do you have some suggestions on this? It's a tough one!

Link to comment
Share on other sites

×
×
  • Create New...