-
Notifications
You must be signed in to change notification settings - Fork 3
Developer Rules
Convert File provides 3 events (React on event)
-
File conversion has been requested
. -
File conversion has succeeded
. -
File conversion has failed
.
All 3 events provide two variables, a file object and the field instance configuration that the file is associated with. In cases that no such association exists, a simulated field instance configuration will be provided.
-
Conversion provider
. The provider that has been requested. -
Conversion format
. The destination format that has been requested. -
Original format
. The original file extension before any formatting has been done.
After a successful conversion to PDF by any provider a confirmation message will be displayed:
All rules actions that do file conversion are provided by sub modules. These modules, called providers, are not enabled automatically. If no file conversion actions are appear in the available selection it may be that the provider modules are not enabled.
Several providers are bundled with the Convert File module. Following is an example selection of reaction rules that these will provide:
All actions should be written so that they may be chained back to back. This allows conversion across providers. As an example an uploaded .docx could be converted to .pdf by the Google Drive provider, then handed off to ImageMagick to convert the .pdf into a .png. The user experience is simply to have their uploaded .docx automatically converted into a .png file.