writeFileToShareableFile
Hashes the links of given attachments and then tries to create a new file under that hash. If the file already exists checks that the full file has been written and shares it if it has, in other cases downloads the file and writes it.
Return
Returns a Result. If the action was successful Result.Success will contain a Uri pointing to the file, otherwise Result.Failure will contain a Error.