Model URL after upload

Discussion in 'Shapeways API' started by emnullfuenf, Oct 6, 2011.

  1. emnullfuenf
    emnullfuenf New 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?

  2. mctrivia
    mctrivia New Member
    there is but it is not documented. let me see if I can find it.
  3. emnullfuenf
    emnullfuenf New Member
  4. macouno
    macouno New 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);
    	$nr = intval($result);
    	$link = ''.$nr.'/'.$fileName.'.html';
  5. mctrivia
    mctrivia New Member
    The filename on safeways is fake. You just need up to the / after model number.