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

Resumable File Upload using API #53

Closed
HinaSharma1988 opened this issue Jun 13, 2018 · 3 comments
Closed

Resumable File Upload using API #53

HinaSharma1988 opened this issue Jun 13, 2018 · 3 comments

Comments

@HinaSharma1988
Copy link

I need to do resumable file uploading using REST API (Laravel),
API will be consumed by Android APP.
Please Suggest.

@ankitpokhrel
Copy link
Owner

ankitpokhrel commented Jun 13, 2018

@HinaSharma1988 you can setup server in Laravel as explained in this doc. After you setup the server, following endpoints will be available to you.

# Gather information about server's current configuration
OPTIONS /files

# Check if the given upload is valid
HEAD /files/{upload-key}

# Create a new upload
POST /files

# Resume upload created with POST
PATCH /files/{upload-key}

# Delete the previous upload
DELETE /files/{upload-key}

Now, you can either use tus-android-client (recommended) or manually send request to these endpoints to upload your file.

@Yangwendaxia
Copy link

Yangwendaxia commented Aug 6, 2018

@ankitpokhrel I need to do resumable file uploading using REST API (Laravel) too,
API will be consumed by browser. After I setting up server in Laravel as you mentioned , how should I implement the client code ?

@ankitpokhrel
Copy link
Owner

@Yangwendaxia Client can be implemented as described here. You can get some ideas from this example. If you are using JS for file upload, you can either use uppy as described here and example here or you can use official tus-js-client.

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

No branches or pull requests

3 participants