Skip to content

Commit

Permalink
#60 method url
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Oct 12, 2021
1 parent 5e7b029 commit 27a2141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/ZenodoManager.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 27a2141

Please sign in to comment.