Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Thumbnail ask for regenerate and Add image preview #36

Closed
eromano opened this issue Aug 12, 2016 · 3 comments
Closed

Thumbnail ask for regenerate and Add image preview #36

eromano opened this issue Aug 12, 2016 · 3 comments

Comments

@eromano
Copy link
Contributor

eromano commented Aug 12, 2016

No description provided.

@eromano
Copy link
Contributor Author

eromano commented Aug 12, 2016

Due a problem in the RestApi the thumbnail could be not generated during the upload:

https://github.com/Alfresco/community-edition/blob/master/projects/remote-api/source/java/org/alfresco/rest/api/impl/NodesImpl.java#L2610

When this problem occurs , the thumbnails have to be asked with the parameter c=queue in order to be regenerated.Something like :

http://127.0.0.1:8080/share/proxy/alfresco/api/node/workspace/SpacesStore/ac1c98aa-67de-417f-af81-5ada42e16d60/content/thumbnails/doclib?c=queue&ph=true&lastModified=doclib:1471021625609

More details can be found also in this discussion in the forum:

https://forums.alfresco.com/forum/developer-discussions/repository-services/how-generate-thumbnail-use-alfresco-05162013-0415

With this parameter probably the thumbnails are regenerated every time ( this is the approach used in Share ).

https://github.com/Alfresco/community-edition/blob/master/projects/remote-api/source/java/org/alfresco/repo/web/scripts/quickshare/QuickShareThumbnailContentGet.java#L115

Despite the fact that this approach regenerate the thumbnail you need to reload it at least once in order to display it.

eromano added a commit that referenced this issue Aug 12, 2016
@eromano
Copy link
Contributor Author

eromano commented Aug 12, 2016

Maybe we can add inside the alfrescoContent api a system that call the renditions api:

POST /nodes/{nodeId}/renditions

when one of thumbnail link return 404 in order to ask to regenerate it

@eromano
Copy link
Contributor Author

eromano commented Aug 16, 2016

From the conversation with @ohej we can:

For multipart/form-data upload you can use the renditions field to create renditions (e.g. doclib) asynchronously upon upload. Note that currently only one rendition can be requested. Also, as requesting rendition is a background process, any rendition failure (e.g. No transformer is currently available) will not fail the whole upload and has the potential to silently fail.

the parameter is parsed here

https://github.com/Alfresco/community-edition/blob/master/projects/remote-api/source/java/org/alfresco/rest/api/impl/NodesImpl.java#L2524

@eromano eromano closed this as completed Aug 23, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant