-
Notifications
You must be signed in to change notification settings - Fork 1
Tasks
The entrypoint for submitted urls, each url is delegated to a url specific task. If no suitable task was found the url is delegated to the url.generic
task. If the url is invalid it is discarded.
Name | Type | Description |
---|---|---|
item_id |
int |
The id of an item. |
urls |
list |
List of urls. |
Called for a unspecified url, it determines the type of the URL by loading only the first few bytes, those are then used to match against magic numbers (file signatures) of accepted filetypes. In which case it delegates the url to url.download
.
Name | Type | Description |
---|---|---|
item_id |
int |
The id of an item. |
url |
string |
A URL. |
Downloads a URL to a temporary destination then delegates to file.discover
.
Name | Type | Description |
---|---|---|
item_id |
int |
The id of an item. |
url |
string |
A URL. |
Validates the type and size of a temporary file, it delegates based on mimetype. Images proceed to image.discover
.
Name | Type | Description |
---|---|---|
item_id |
int |
The id of an item. |
tempfile |
string |
Absolute path to a temporary file. |
data.url |
string |
Download Url. |
data.upload |
string |
Original upload filename. |
Image processing, it validates and collects metadata about the image. Then schedules storing the image at their final destination.
Name | Type | Description |
---|---|---|
item_id |
int |
The id of an item. It must exist. |
data.tempfile |
string |
Absolute path to a temporary image file. |
mimetype |
string |
Detected mimetype of the file. |
url |
string |
Url this file was downloaded from. |
upload |
string |
Original upload filename. |