Skip to main content
1-Visitor
September 25, 2018
Question

Download file from system repository without login

  • September 25, 2018
  • 1 reply
  • 3713 views

 

I have a file in the system repository that I would like users to download without having to login to the mashup.

I have a service that emails links to the files but when they are clicked they take you to the mashup login page (unless you are already logged in, in which case the file download begins).

 

Thanks

1 reply

22-Sapphire I
September 26, 2018

Have you tried this with using an appkey for authentication?

csummers11-VisitorAuthor
1-Visitor
September 26, 2018

I have, but couldn't get it to work - even with the appkey in the link it redirects you to the mashup login page.

 

Every time you open the mashup you're asked to login (even if already logged in under a different tab). I've been able to get around that using the appkey to open the mashup without logging in on that tab but this is only effective if you're already logged in under a different tab.

14-Alexandrite
October 15, 2018

If you're using 8.3, there is a new security function that seems to impact downloads.  Content Type Filtering will need to be turned off in the Subsystems > Platform Subsystem configuration (and Application Key URL needs to be left ON).

 

Once Content Type Filtering is disabled, and API URL is enabled, you should be able to use a download URL such as the following to access your file (no mashup needed):

http://localhost:8080/Thingworx/FileRepositories/SupportTools.Repository/stacktrace?appKey=8e96f3e0-bb7b-4344-9e6e-ac5200219065&x-thingworx-session=true

 

More information on the Content Type Filtering is available here:

http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/#page/ThingWorx%2FHelp%2FREST_API%2FUpdatingtheRequestMethodandContentTypeFilteringforCSRFProtection.html