Home » Developers » Shapeways API » Model URL after upload
Search Search  
Show: Today's Messages    Show Polls    Message Navigator
Model URL after upload [message #36054] Thu, 06 October 2011 15:59 UTC Go to next message
avatar emnullfuenf  is currently offline emnullfuenf
Messages: 4
Registered: May 2010
Go to all my models
Junior Member
Hello all,

is there a way to get the URL of an uploaded model? I think about the product details page that is sent by e-mail when the model is ready.

There should be an API call that get's a models status when sending a session ID like "getModelPrice" does.

Am i missing something?

Em
Re: Model URL after upload [message #36068 is a reply to message #36054 ] Thu, 06 October 2011 18:38 UTC Go to previous messageGo to next message
avatar mctrivia  is currently offline mctrivia
Messages: 808
Registered: September 2010
Go to my shop
Senior Member
there is but it is not documented. let me see if I can find it.


Follow me on twitter http://twitter.com/mctrivia or my blog at http://4ddice.blogspot.com/
Re: Model URL after upload [message #36109 is a reply to message #36068 ] Fri, 07 October 2011 06:35 UTC Go to previous messageGo to next message
avatar emnullfuenf  is currently offline emnullfuenf
Messages: 4
Registered: May 2010
Go to all my models
Junior Member
Got it:
$result = $this->client->submitModel($this->session, $model, null, 'generated-creator');

Macouno already documented it here:
http://www.shapeways.com/forum/index.php?t=msg&&th=6 203&goto=33090#msg_33090
Re: Model URL after upload [message #36112 is a reply to message #36054 ] Fri, 07 October 2011 08:00 UTC Go to previous messageGo to next message
avatar macouno is currently online macouno
Messages: 113
Registered: April 2008
Go to my shop
Senior Member
Yeah here's a bit of my code, because I think more people will be looking for this...

Of course I make sure the fileName is nicely formatted first. I do that using this function: make-a-safe-url It may be for urls, but works great for making sure filenames are formatted correctly as well.

So inside the uploadFile function (in SoapAPI.php) you do this:

$result = $this->client->submitModel($this->session, $model, null, 'generated-creator');


And you use the function like this...

$result =  $connection->uploadFile($fileName);
		
if(is_numeric($result)){
	
	$nr = intval($result);
	$link = 'http://www.shapeways.com/model/'.$nr.'/'.$fileName.'.html';
}
Re: Model URL after upload [message #36127 is a reply to message #36112 ] Fri, 07 October 2011 11:11 UTC Go to previous message
avatar mctrivia  is currently offline mctrivia
Messages: 808
Registered: September 2010
Go to my shop
Senior Member
The filename on safeways is fake. You just need up to the / after model number.


Follow me on twitter http://twitter.com/mctrivia or my blog at http://4ddice.blogspot.com/

 
   
Previous Topic:Protecting shop from being flooded with 3D Models
Next Topic:Security upgrades need on API

Logo

Hello.

We're sorry to inform you that we no longer support this browser and can't confirm that everything will work as expected. For the best Shapeways experience, please use one of the following browsers:

Click anywhere outside this window to continue.