Github

Uploading

Uploading is part of the ingest process, information and modules specific to uploading can be found here. This can be done either with the UI or through a batch process.

Upload through the UI

Uploads are not resumable and subject to connectivity issues. If you really want to upload large files, you should consider some alternatives such as the following:

  • Batch Ingest: The standard way of operating is utilizing the CSV import process. This is primarily through a terminal but offers a highly customizable experience allowing for complex metadata and many other features. For more inforformation please see previous section.
  • Alan Stanley’s TUS module, which will let you upload large files in forms. Patch #16 required from Drupal 422 error page.
  • Uppy File Uploader Uses the chunking, resumable, TUS file transfer protocol to upload files. This is a modular open source JavaScript file uploader.
  • Using flysystem‘s ftp and sftp plugins to make files available if you can run an FTP server.
  • Private File System: Private File System provides a way to serve files(i.e. static assets) from the Drupal private file system(private://) based on custom restrictions.
  • File Upload Options: trivial for the document but useful for technical side of the system. This specifies what should happen when uploaded files have the same name as existing files. Configured per field, the options are are grouped by entity type.

Technical Notes

If you want to upload large (> 1GB) files, the VM provided by the community has some options not set. You’ll need to tune the following settings in your php.ini:

  • upload_max_filesize – The maximum allowed upload file size.
  • post_max_size – The maximum allowed POST data size.
  • max_input_time – Maximum allowed input time.
  • max_execution_time – The maximum allowed time the scripts are allowed to run.

However, large file transfer over HTTP still has a host of issues once you properly configure your server. PHP’s integer type is signed and many platforms use 32bit integers, some filesystem functions may return unexpected results for files which are larger than 2GB and could cause filesize to report the UI an incurrate reading. It won’t cause functions to fail just to not report correctly. This is a reported flaw within PHP.