0

I have already posted in https://stackoverflow.com/questions/26776003/how-to-use-htmldiff-in-django-to-show-difference-of-two-uploaded-files

However, I want to know if there is an easy way to upload a couple of files and submit which shows the differences between those two files in the next page. I made it work in the link above, but it won't work for large files like 4/ 5 MB.

I desperately need to solve this. Thank you.

Community
  • 1
  • 1
MiniGunnR
  • 5,590
  • 8
  • 42
  • 66
  • What does "won't work" mean? – RemcoGerlich Nov 09 '14 at 21:02
  • It would just keep loading the next page and show nothing. When I run the same script for diff in a .py file and run it, the same thing happens in the terminal also. The cursor keeps blinking but it won't show the result. So I'm guessing instead of max_file_size there is something wrong with my program. – MiniGunnR Nov 10 '14 at 06:39

2 Answers2

0

Have you tried running a different diff tool on the server and just dumping the HTML output? diff2html comes to mind, maybe see this answer for some more details?

Community
  • 1
  • 1
vikramls
  • 1,802
  • 1
  • 11
  • 15
0

it won't work for large files like 4/5 MB

The problem you might be having is the client_max_body_size or equivalent parameter in your web server's config. For example for nginx you'll find this in /etc/nginx/sites-available/yoursite.

server {
        listen 443;
        server_name yoursite.example;

        client_max_body_size 2M;
Karl
  • 3,394
  • 2
  • 22
  • 31
  • I can upload the files, but the script of difflib doesn't finish running and doesn't display the result! – MiniGunnR Nov 12 '14 at 09:10