-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downloaded files are corrupted and cannot be unzipped #8
Comments
Hi @Hoshiyar0703 , I fixed this issue by modifying the bin/netstorage.js file. The node.js request module defaults to UTF-8 when pulling the requested file. If you set the request attribute,
Once you have updated the src/netstorage file you, can test by renaming the bin/akamaiNetstorage executable and use the uncompiled akamaiNetstorage script. This will then pick up the changes you made in the bin/netstorage file and let you test the download. Edit: Request package information: https://www.npmjs.com/package/request; See Request Options | encoding. |
Hi @GeoffLThompson, I am experiencing this issue as well. Have attempted to implement your workaround, but was not able to make the updated src/netstorage.js to take effect in the bin/akamai-netstorage executable. Can you please provide more details on how to commit the updated change into the bin/akamai-netstorage executable? thanks, |
Hi Peter (@pjnchai ) To clarify, I was incorrect in my previous post regarding the If this still does not address your issue then read on. QuickThe quick method to test the fix and ensure readable files after download, is as follows:
Not QuickThe long term fix is to compile the plugin again with the fix applied. I am assuming a Windows environment here. Other environments will vary but should follow a similar approach.
This is not a comprehensive set of instructions but it should get you at least further ahead. @synedra What would really help things along, would be a setup guide for working on bug fixes and features covering things like development tools and acceptable patterns, naming conventions, etc. |
If there is a modified version, please share it. |
Issue : The files which are downloaded via CLI (Netstorage) aren't accessible (not openable). However, the same file when downloaded using SFTP via Netstorage is accessible without any issue.
Upload domain : newsbyteslds.upload.akamai.com
Cpcode : 719450
File name : /719450/newsbytesapp_714978_714978.esw3c_S.201808210000-2400-0.gz
Error message when trying to open the file using gunzip after it was downloaded via CLI :
gunzip: newsbytesapp_714978_714978.esw3c_S.201808210000-2400-0.gz: not in gzip format
Steps used to replicate the Issue
"akamai netstorage download newsbytesapp_714978_714978.esw3c_S.201808210000-2400-0.gz"
Tests performed :
Downloaded the same file using filezilla --> File was successfully opened using gunzip
Downloaded the same using CLI --> File wasn't opened using gunzip
The MD5sum of the same file downloaded via CLI and download via SFTP ( Filezilla ) aren't same. They are different
MD5 of the file downloaded via CLI
$ md5 newsbytesapp_714978_714978.esw3c_S.201808210000-2400-0.gz
MD5 (newsbytesapp_714978_714978.esw3c_S.201808210000-2400-0.gz) = a1cd5aaf96941f01e7ef52d772590502
md5sum of the file on the storage server
\md5sum newsbytesapp_714978_714978.esw3c_S.201808210000-2400-0.gz
3941b9dbfcdf77cf88a2fd014cf14d5b newsbytesapp_714978_714978.esw3c_S.201808210000-2400-0.gz
\
The text was updated successfully, but these errors were encountered: