Uploading document to external url

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
jorik
Posts: 3
Joined: Wed Jan 04, 2017 4:51 pm

Uploading document to external url

Post by jorik »

Hello,

I'm quite new to the Macro world, but not particularly to programming.
I was looking for a way to save the document which I'm currently editing and send it to an external url. I came across the .storeToURL() method, but I can't seem to figure out if this also works for external urls.
Would this be possible? And with what language could this best be made with?

Even if what I'm describing isn't possible, can I execute a command line which starts up e.g. a java program with the document's filepath as an argument, so that an external java program uploads the document I'm editing?

Thanks in advance for your opinion,

Jorik
OpenOffice 4.1.2
Windows 8
User avatar
Zizi64
Volunteer
Posts: 11361
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Uploading document to external url

Post by Zizi64 »

I came across the .storeToURL() method, but I can't seem to figure out if this also works for external urls.
Would this be possible? And with what language could this best be made with?
What so you mean as "external"?

It is a LAN connection, a shared library of an another machine?

Code: Select all

"file://NAME_OF_ANOTHERPC/A_SHARED_LIBRARY/SOME_SUBDIRECTORY/filename.ext"

Or do you want make an FTP connection to a WEBserver (or to an other type server)?

Working examples (with dummy data):

Code: Select all

"ftp://somebody%40hostname.com:PaSSwOrd@111.222.333.444/directory/subdir/filename.ext"
%40 = @ - when the user identification is a mail address.


another example:

Code: Select all

"ftp://servicename/hostname.com:PaSSwOrd@111.222.333.444/directory/subdir/filename.ext"
This methods works for me from the StarBasic.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
jorik
Posts: 3
Joined: Wed Jan 04, 2017 4:51 pm

Re: Uploading document to external url

Post by jorik »

Thanks for your reply, I will look into it.
OpenOffice 4.1.2
Windows 8
Post Reply