Page 1 of 1

How to directly load database materials into exporter?

Posted: Fri Sep 04, 2009 8:21 am
by Whaat
Is there a way to download a PIGM file from the internet and load it into the exporter without the user having to save the PIGM to a specific location and then browse to load it? I think Maxigo does this but I am a bit stumped for how to do this using Ruby and Javascript.

Re: How to directly load database materials into exporter?

Posted: Fri Sep 04, 2009 10:29 am
by benn
Use net/http to download the file. Use the json code to search for materials, then fire net/http, or open-uri, then you're good to go :)

Re: How to directly load database materials into exporter?

Posted: Fri Sep 04, 2009 6:46 pm
by suvakas
Hey Whaat,
Maxigo downloads pigm from the database to a temporary folder. That's why the saving process seems transparent for the user. I never ask for the location to save, but using a temp folder instead.

Re: How to directly load database materials into exporter?

Posted: Sat Sep 05, 2009 2:46 am
by Whaat
suvakas wrote:Hey Whaat,
Maxigo downloads pigm from the database to a temporary folder. That's why the saving process seems transparent for the user. I never ask for the location to save, but using a temp folder instead.
Yes, I assumed that. My problem is that I don't know how to download to the temporary folder. I don't know how to control the path for the download.

@benn: Thanks, but your post was not very helpful. I'm not a programmer by trade, remember? :roll: I need it spelled out for me. Can you give some working sample code?

Re: How to directly load database materials into exporter?

Posted: Sat Sep 05, 2009 2:48 am
by fused
im looking for a way to download stuff via c++.

if anyone know one, id appreciate a hint :)

Re: How to directly load database materials into exporter?

Posted: Sat Sep 05, 2009 3:23 am
by dougal2
fused wrote:im looking for a way to download stuff via c++.

if anyone know one, id appreciate a hint :)
libcurl ?

Re: How to directly load database materials into exporter?

Posted: Sat Sep 05, 2009 4:07 am
by fused
ah yes. now you said it i recall Nick said it once...

thanks a million! :)