Issue with uploading large pdf files

LiteCart Fan
Tól től Netherlands
Tagság márc. 2021 óta

I would like to upload a PDF catalog and add it to a product. However, this file is about 80MB in size, but it won't work. I have now also tried smaller files (7-20mb), but that doesn't work either. Yes, small files of about 1 MB are no problem. But I have other large files of even more than 100 MB that I would like to link.

LiteCart Fan
Tól től Netherlands
Tagság márc. 2021 óta

Thank you for your response, I finally managed to adjust it in the backend of my hosting server.

Now I have another question, is it perhaps also possible to change the line so that the document is opened immediately instead of downloaded? Because files of 100mb are quite large.


  foreach (array_keys($files) as $key) {
    echo '<li>'. functions::draw_fonticon('fa-paperclip') .' <a href="'. document::ilink('get_file', array('product_id' => $product_id, 'file_id' => $files[$key]['id'])) .'" target="_blank">'. $files[$key]['filename'] .'</a></li>' . PHP_EOL;
  }
?>```
tim
Founder
Tól től Sweden
Tagság máj. 2013 óta
tim

To make files open rather than save change the header in get_file.inc.php:
    header('Content-type: application/octet-stream');

To the right content type like
    header('Content-Type: application/pdf');
Or if the mime types are in the database:
    header('Content-Type: ' . $file['mime']);

Also change
    header('Content-Disposition: attachment; filename="' . $file['filename'] .'"');
To
    header('Content-Disposition: inline; filename="' . $file['filename'] .'"');

LiteCart Fan
Tól től Netherlands
Tagság márc. 2021 óta

Thank you very much for this comment, I am very happy about this. This is really an improvement for my site, I would never have come up with this myself.

Te
Ez a weboldal nem használ cookie-kat és nem használ harmadik féltől származó nyomkövetési technológiát. Úgy gondoljuk, hogy jobban tudjuk csinálni, mint mások, és tényleg gondolunk az Ön magánéletére.