copyOrCloneFile method

Future<Map> copyOrCloneFile({
  1. required String file_code,
  2. String? folder_id,
  3. String? apiKey,
})

Copy / Clone your's or other's file

DOCS: https://doodstream.com/api-docs#files-copy

Implementation

Future<Map> copyOrCloneFile({
  required String file_code,
  String? folder_id,
  String? apiKey,
}) async {
  Map result = await invoke(
    uriPath: "file/clone",
    apiKey: apiKey,
    uriQueryParameters: {
      "file_code": DoodstreamUtils.parseToFileId(data: file_code),
      "fld_id": folder_id,
    },
    statusCodes: [200],
    specialTypeName: "dmca",
  );

  return result;
}