4
$\begingroup$

I'm using the function below to update my notebooks in the cloud. Traditionally it deployed to the following location:

https://www.wolframcloud.com/obj/yaroslavvb/whitening/curvature-unit-tests.nb

I got the URL as output of CloudDeploy call, something like this CloudObject["https://www.wolframcloud.com/obj/yaroslavvb/newton/curvature-unit-tests.nb"]

However, in the last week something has changed so that CloudDeploy instead shows a different URL when I run it

CloudObject["https://www.wolframcloud.com/obj/user-eac9ee2d-7714-42da-\ 8f84-bec1603944d5/newton/curvature-unit-tests.nb"]

Any how I can get the original shorter url out of CloudDeploy?

deploy:=Module[{notebookFn, parentDir,cloudFn,result},
Print[DateString[]];
notebookFn=FileNameSplit[NotebookFileName[]][[-1]];
parentDir=FileNameSplit[NotebookFileName[]][[-2]];
cloudFn=parentDir~StringJoin~"/"~StringJoin~notebookFn;
result=CloudDeploy[SelectedNotebook[],CloudObject[cloudFn],Permissions->"Public",SourceLink->None];
Print["Uploading to ",cloudFn];
result
]```
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.