1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 19:02:41 +01:00
phorge-phorge/resources/sql/autopatches/20160921.fileexternalrequest.sql
Josh Cox eea540c5e4 Endpoint+controller for a remarkup image proxy
Summary:
Ref T4190. Currently only have the endpoint and controller working. I added caching so subsequent attempts to proxy the same image should result in the same redirect URL. Still need to:

- Write a remarkup rule that uses the endpoint

Test Plan: Hit /file/imageproxy/?uri=http://i.imgur.com/nTvVrYN.jpg and are served the picture

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley, yelirekim

Maniphest Tasks: T4190

Differential Revision: https://secure.phabricator.com/D16581
2016-09-23 10:28:24 -04:00

14 lines
487 B
SQL

CREATE TABLE {$NAMESPACE}_file.file_externalrequest (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
filePHID VARBINARY(64),
ttl INT UNSIGNED NOT NULL,
uri LONGTEXT NOT NULL,
uriIndex BINARY(12) NOT NULL,
isSuccessful BOOL NOT NULL,
responseMessage LONGTEXT,
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL,
UNIQUE KEY `key_uriindex` (uriIndex),
KEY `key_ttl` (ttl),
KEY `key_file` (filePHID)
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};