diff --git a/R/ZenodoManager.R b/R/ZenodoManager.R index 4a93b64..e768df3 100644 --- a/R/ZenodoManager.R +++ b/R/ZenodoManager.R @@ -905,7 +905,7 @@ ZenodoManager <- R6Class("ZenodoManager", newapi <- FALSE } if(newapi) self$INFO(sprintf("Using new file upload API with bucket: %s", record$links$bucket)) - method_url <- ifelse(newapi, sprintf("%s/%s", unlist(strsplit(record$links$bucket, "api/"))[2], filename), sprintf("deposit/depositions/%s/files", recordId)) + method_url <- if(newapi) sprintf("%s/%s", unlist(strsplit(record$links$bucket, "api/"))[2], filename) else sprintf("deposit/depositions/%s/files", recordId) zenReq <- ZenodoRequest$new(private$url, method, method_url, data = filename, file = upload_file(path), token = self$getToken(),