emteknetnz/silverstripe-file-cloner

There is no license information available for the latest version (1.0.1) of this package.

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

1.0.1 2023-05-24 08:20 UTC

This package is not auto-updated.

Last update: 2024-04-25 11:12:05 UTC


README

A quick silverstripe build task to generate lots of published files in a single folder

Only use this for testing!

Important! if you copy images you'll end up with 4x the number of files that you expect because variants will be created, so recommend you just use PDF files

Instalation:

composer require emteknetnz/silverstripe-file-cloner

Usage:

  1. Login as admin
  2. Ensure there are 2x folders:
  • First folder contain one or more source files that will be cloned - recommend you use PDFs and not images
  • Second folder is where you will clone the files to
  1. Ensure the file(s) in the first folder have been published via the CMS
  2. Run the build task https://mysite.test/dev/tasks/FileClonerTask?fileID=123&folderID=456&num=1000

Querystring parameters

  • fileID - the file ID of the file you wish to clone from the first folder
  • folderID - the folder ID of the second folder you wish to clone all the files into
  • num - the number of files to clone - between 1 and 10,000