- Object types
File
You can fetch files from an HTTP resource, based on specific parameters, and define its name according to the file URL.
Parameters
| Parameter | Type | Description |
|---|---|---|
type | String | The type of source to retrieve the file from (Web for an HTTP resource). |
href* | String | In case of a Web type, the URL of the resource. |
Web fetch
You can use the Web fetch source to retrieve resources that are accessible from an (optionally pre-signed) URL.
To determine the filename, a web fetch evaluates the following in order:
- If the Content-Disposition header includes a filename, it uses that filename (for example,
Content-Disposition: attachment; filename="report.pdf"). - If the URL refers to a filename, it uses that filename (for example,
http://www.gstatic.com/webp/gallery/5.jpgresults in5.jpgas the filename). - If there is a filename parameter in the URL, it uses the value for the file name (for example,
http://picsum.photos/400/300/?image=1&filename=test.jpegresults in test.jpeg). - If none of the above are available, the web fetch reverts to the hostname, top level domain, and a GUID (Globally Unique IDentifier). These concatenate automatically using _ (underscore) (for example,
http://picsum.photos/400/300/?image=1results inpicsum_photos_814be). There are no file extensions.
If you have suggestions for improving this article, let us know!