Closed joeyvmason closed 4 years ago
@joeyvmason Thanks for the PR, we improved Copy functionality in v3.3.0, changed the result of the copy that returned to client, now you can directly use file or url from the result no need to process data yourself. Look at Client.copyFileLocalStorage() and Client.copyFileRemoteStorage() methods.
The ObjectMapper is unable to process CopyFileData response because data field is of type
String
and not ofFileData
:Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class com.uploadcare.data.FileData] from String value ('s3://foobar/uploadcare/80a58309-d300-4ecd-a54d-a95fb50054f4.wav'); no single-String constructor/factory method at [Source: {"type":"url","result":"s3://foobar/uploadcare/80a58309-d300-4ecd-a54d-a95fb50054f4.wav"}; line: 1, column: 24](through reference chain: com.uploadcare.data.CopyFileData["result"])