Import large files

Created on 10 January 2023, over 1 year ago
Updated 16 February 2023, over 1 year ago

Problem/Motivation

Module is not able to import large files, bigger than PHP memory limits.

Steps to reproduce

  • Create media entity, allow to upload large files, larger than memory limit
  • You can use https://www.drupal.org/project/plupload_widget β†’ or other similar modules
  • Import earlier created media entity to client site
  • System crashes due to out-of memory (Fatal error: Allowed memory size of x bytes exhausted)

Proposed resolution

Dont use file_get_contents() as it loads entire file into PHP memory.

Options:
Use for example copy function - https://www.php.net/manual/en/function.copy.php
Use guzzle sink option - https://docs.guzzlephp.org/en/stable/request-options.html#sink

Remaining tasks

Refactor \Drupal\entity_share_client\Plugin\EntityShareClient\Processor\PhysicalFile

πŸ› Bug report
Status

Needs work

Version

3.0

Component

Entity share client

Created by

πŸ‡΅πŸ‡±Poland alorenc Wolsztyn, πŸ‡΅πŸ‡±

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024