Skip to main content
1-Visitor
Sep 25, 2018 10:26 AM UTC
Question

Download file from system repository without login

 

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

4 replies

22-Sapphire I
Sep 26, 2018 11:45 AM UTC

Have you tried this with using an appkey for authentication?

Translate
csummers11-VisitorAuthor
1-Visitor
Sep 26, 2018 11:57 AM UTC

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.

Translate
14-Alexandrite
Oct 15, 2018 8:05 PM UTC

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

Translate