View Issue Details

IDProjectCategoryView StatusLast Update
0004029Composrcorepublic2022-08-18 14:53
ReporterChris GrahamAssigned ToChris Graham 
SeverityFeature-request 
Status closedResolutionduplicate 
Product Version 
Fixed in Version 
Summary0004029: SERVE_LOCALLY symbol (to serve self cached versions of third party hosted URLs)
DescriptionAdd a new Tempcode symbol, SERVE_LOCALLY. The purpose is a way to copy remote URLs locally using Tempcode, and serve them locally (maybe for speed, maybe to avoid hammering someone else's server, maybe as an automatic backup). You pass it a URL and the first time it runs it copies that URL to a local file using an algorithmicly-defined filename (i.e. if the local file does not exist yet). A second optional parameter would force a particular file extension (as we have no other way of replicating the original mime-type if we are just serving on-disk files with no database data).

E.g.

{$SERVE_LOCALLY,http://example.com/some-video,mp4}

This example would download the file at "http://example.com/some-video" and save it in something like "uploads/localised_remote_urls/some-video.mp4". In this example the URL has no file extension, so I am forcing one so I know it will have the correct mime type served by Apache.

The symbol would most likely be used in catalogue templates, when people enter URLs to media.
TagsNo tags attached.
Time estimation (hours)1
Sponsorship open

Relationships

duplicate of 0003854 non-assigned Auto-tracked/proxied linking via Tempcode 

Activities

Chris Graham

2022-08-18 14:53

administrator   ~0007467

Merged with 0003854

Issue History

Date Modified Username Field Change
2020-01-09 15:43 Chris Graham New Issue
2020-01-09 18:11 Chris Graham Description Updated View Revisions
2022-08-15 00:54 Chris Graham Summary SERVE_LOCALLY symbol => SERVE_LOCALLY symbol (to serve self cached versions of third party hosted URLs)
2022-08-15 00:58 Chris Graham Relationship added related to 0003854
2022-08-15 01:00 Chris Graham Relationship deleted related to 0003854
2022-08-18 14:53 Chris Graham Assigned To => Chris Graham
2022-08-18 14:53 Chris Graham Status non-assigned => closed
2022-08-18 14:53 Chris Graham Resolution open => duplicate
2022-08-18 14:53 Chris Graham Note Added: 0007467
2022-08-18 14:53 Chris Graham Relationship added duplicate of 0003854