This is for non-public downloads. Do it similar to how Amazon and Google does it. An endpoint resource will be used to request the creation of the download file the URI will have a "key" associated with it.
A external endpoint would be /download/{accesstoken}/filename.ext
The data will be retrieved from a Cache which will expire after a given time
There are two internal endpoints
/store which will store the data into the cache and provide an access token. It passes the following meta data in along with formdata which contains the file contenxt
There can be multiple files stored for a given request. Invoking with the same meta will update the data
The content disposition portion will say the file name and content type.
The meta is used to provide information on how the record was built
/check-meta which will check if the meta is present the store. This is used to prevent double processing. It returns the following:
{ accessToken, expires, files [ { filename, contentType } ] }
This is for non-public downloads. Do it similar to how Amazon and Google does it. An endpoint resource will be used to request the creation of the download file the URI will have a "key" associated with it.
A external endpoint would be
/download/{accesstoken}/filename.extThe data will be retrieved from a Cache which will expire after a given time
There are two internal endpoints
/store which will store the data into the cache and provide an access token. It passes the following meta data in along with formdata which contains the file contenxt
There can be multiple files stored for a given request. Invoking with the same meta will update the data
The content disposition portion will say the file name and content type.
The
metais used to provide information on how the record was built/check-meta which will check if the meta is present the store. This is used to prevent double processing. It returns the following: