On the Moflow platform, file transfer lets you copy files from system storage to a remote server during application development. You can use this feature to transfer system files to other storage media or services.
Features
System file transfer: You can copy files that are already on the Moflow platform to a remote server without needing to upload them again.
Complete solution: The Moflow platform provides a complete solution that handles local file uploads, system file staging, and transfers to remote servers.
Low-code operations: You can copy files to a remote server using a simple graphical interface. No complex code is required.
Steps
Upload a local file to system storage
On the canvas, select or drag a file upload widget to the desired location.
In the Interaction settings, set the Action to Upload to system file storage and specify the System path.
Click the widget to upload the file.
Configure an integration operation
In the Code Panel, create an integration operation.
Set the integration resource to Default File Integration. This resource is located under file > Default Integration.
Set the Operation type to Copy file to remote server.
For the Moflow file ID parameter, enter the target file ID. For example, you can use `upload1.values[0].fileId` as the parameter.
Configure the URL and access method for the remote server.
Enter the required header information for the remote server.
Execute the integration operation
You can call the integration operation from the panel or trigger it with an event. For more information, see Integration operations.
Scenarios
1. Alibaba Cloud Model Studio file lease upload
To perform a file lease upload that uses the OpenAPI of an Alibaba Cloud Model Studio data center, you must first upload the file to the system. After the upload is complete, enter the remote server address that is returned by the file lease API into the file integration operation. Then, set the Moflow file ID to the system file ID from the upload widget to transfer the data. For more information about this process, see ApplyFileUploadLease - Apply for a file upload lease.