Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Download Endpoint #33

Open
trajano opened this issue Nov 9, 2017 · 1 comment
Open

File Download Endpoint #33

trajano opened this issue Nov 9, 2017 · 1 comment

Comments

@trajano
Copy link
Owner

trajano commented Nov 9, 2017

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

{ expiresIn. meta }

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 } ] }
@trajano
Copy link
Owner Author

trajano commented Nov 9, 2017

Only the meta data will be stored in the cache however the storage will be using a file system. The file system is expected to be mounted on a clustered network storage.

The store can also point to an existing file if allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant