How to download an image uploaded with the Files API?

Sebastian
I’ve uploaded some files using the Files API, but I cannot find a way to download it? The documentation (https://docs.threekit.com/docs/files-api) only shows how to upload files and return files’ details, but no the fil…

Comments

9 comments

  • Comment author
    Sebastian

    I’ve uploaded some files using the Files API, but I cannot find a way to download it? The documentation (https://docs.threekit.com/docs/files-api) only shows how to upload files and return files’ details, but no the file itself.

    0
  • Comment author
    William Thompson

    @Sebastian - what are you importing and what would you like to export? For example, are you importing 3D files, textures, etc. One approach is to use our Asset Jobs API.

    0
  • Comment author
    William Thompson

    You can also retrieve a file this way: <env>/api/files/:fileId/content env will be which environment you are working out of (Preview, admin, admin-fts, etc).

    0
  • Comment author
    Sebastian

    Hi Will,

    Thanks for your quick response. I’m uploading a snapshot as mentioned in the below link

    Render a snapshot image - Common Implementation Tasks

     
     

    The API you mentioned doesn’t return the file, it only retrieves the file’s details as shown below
    /api/files/:fileId/

    0
  • Comment author
    William Thompson

    Which API did you try, I edited my original post so I mentioned two: Asset Jobs API and retrieving the files directly. Did neither work? I successfully imported & retrieved a file by using the ID and using the api/files/:fileId/content method.

    https://preview.threekit.com/api/files/90913bbf-7634-453c-a146-869a0713b046/content

    0
  • Comment author
    Sebastian

    That was the missing API in the documentation, the "/content” part.

    Thank you!

    0
  • Comment author
    William Thompson

    Happy to help - let me now if you have any more questions!

    0
  • Comment author
    Sebastian

    I’m all set, thanks. Nevertheless, it would be great if the documentation could be reviewed. I noticed there are some options no longer available (e.g. saving files in the save configuration API), some of the responses shown in the documentation don’t match with the current API version, and also provide more details on how to do things.

    0
  • Comment author
    William Thompson

    Thanks for the feedback - we are always adding and improving our documentation, I will be sure to get this addressed as well.

    0

Please sign in to leave a comment.