Skip to main content
added 69 characters in body
Source Link

Consider a social network in which the users upload their images (cover, profile etc). Each image need to have different sizes (ex: large, small, supersmall etc).

The upload is done by a API REST json request which contains the file content and some metadata.

The json response is the different urls for each size and the web app immediately uses these.

Goal:

I want to have fast response (not to process the image and create all the sizes then to return the urls in the API response).

Problem: The web app shows immediately the photos after the api response by using the urls returned, so right now I need to return valid urls that contain/return images.

PS: I can make changes both in the backend and the client web application, so your suggested solutions should not be limited only to backend changes.

Consider a social network in which the users upload their images (cover, profile etc). Each image need to have different sizes (ex: large, small, supersmall etc).

The upload is done by a API REST json request which contains the file content and some metadata.

The json response is the different urls for each size and the web app immediately uses these.

Goal:

I want to have fast response (not to process the image and create all the sizes then to return the urls in the API response).

Problem: The web app shows immediately the photos after the api response by using the urls returned.

PS: I can make changes both in the backend and the client web application, so your suggested solutions should not be limited only to backend changes.

Consider a social network in which the users upload their images (cover, profile etc). Each image need to have different sizes (ex: large, small, supersmall etc).

The upload is done by a API REST json request which contains the file content and some metadata.

The json response is the different urls for each size and the web app immediately uses these.

Goal:

I want to have fast response (not to process the image and create all the sizes then to return the urls in the API response).

Problem: The web app shows immediately the photos after the api response by using the urls returned, so right now I need to return valid urls that contain/return images.

PS: I can make changes both in the backend and the client web application, so your suggested solutions should not be limited only to backend changes.

Source Link

How to return uploaded image urls from REST API without waiting for their processing?

Consider a social network in which the users upload their images (cover, profile etc). Each image need to have different sizes (ex: large, small, supersmall etc).

The upload is done by a API REST json request which contains the file content and some metadata.

The json response is the different urls for each size and the web app immediately uses these.

Goal:

I want to have fast response (not to process the image and create all the sizes then to return the urls in the API response).

Problem: The web app shows immediately the photos after the api response by using the urls returned.

PS: I can make changes both in the backend and the client web application, so your suggested solutions should not be limited only to backend changes.