Download the PHP package ipunkt/fileproxy-client without Composer
On this page you can find all versions of the php package ipunkt/fileproxy-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ipunkt/fileproxy-client
More information about ipunkt/fileproxy-client
Files in ipunkt/fileproxy-client
Package fileproxy-client
Short Description Client library for fileproxy application
License MIT
Informations about the package fileproxy-client
fileproxy-client
A client library for fileproxy
Quickstart
Usage
Setting up our client.
Setting Credentials
Since version 1.1.0 the fileproxy has the ability to protect api calls with a secret token header. You can add that to the client like so
Or, you can configure another header name than the default one:
Setting Headers
Another security level can be added by adding custom http headers for each request. So your infrastructure can verify the request by parsing them. You can achieve this like so:
Files resource
Files resource handles all stuff with the related proxy files. These files are the source for the aliases provided by the service.
Uploading a new file
$file
is a File entity with the main information about the file itself - the reference.
Updating an uploaded file
$file
is a File entity with the main information about the file itself - the reference.
Storing a remote file
$file
is a File entity with the main information about the file itself - the reference.
Updating a stored remote file
$file
is a File entity with the main information about the file itself - the reference.
Requesting a file by reference
$file
is a File entity. You can fetch the hits from it for example.
FileAlias resource
You can create or retrieve aliases with this resource.
Creating an alias
The created $alias
will be returned and includes the download url and the alias id.
Fetching all aliases
You can iterate over all existing $aliases
.
Alias resource
Alias resource handles requesting and deleting of aliases.
Requesting an alias
$alias
is an Alias entity. The main information about an alias is the download url and the hits and hits left statistics data.
Deleting an alias
Alias was deleted when no exception was thrown.
Statistics resource
Requesting statistics
$stats
returns the main statistics for the current service: size in bytes, file and alias count serving and hits summarized.