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

Delegated upload from client app #1

Open
kaetemi opened this issue Jul 25, 2018 · 0 comments
Open

Delegated upload from client app #1

kaetemi opened this issue Jul 25, 2018 · 0 comments
Labels

Comments

@kaetemi
Copy link
Member

kaetemi commented Jul 25, 2018

The client app will send to the server the filetype, filesize, and sha256 hash of the file which it needs to upload. In general these files will be images. It may be nice to let the library generate the options, if it proves useful and practical.

After validating the received options, the server will generate the key for the file in the storage bucket, store this key with the user's account in the database, and then use the library to generate the signed HTTP request to upload the data. The request headers and options are then sent to the client app.

Using the pre-signed HTTP request from the server, the client will upload the file, and notify the server when it is finished. The library is used to handle the upload properly with the pre-signed request.

Handling failed or non-uploaded files and other database cleanup is up to the server, and not a concern here.

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

No branches or pull requests

1 participant