sakaiproject/Hilary — pull request #496 by simong (2013-05-18 17:06:33+00:00)
Title: Previews are not reset properly when uploading new version

When uploading a new version of a PDF, we immediately fetch the content profile again. This is part of the response:

```
"previews": {
"pageCount": 2,
"status": "done",
"total": 8,
"thumbnailUri": "local:c/cambridge/PT/Xs/O1/fK/PTXsO1fKkf/previews/1368202781746/thumbnail.png",
"thumbnailUrl": "/api/download/signed?uri=local:c/cambridge/PT/Xs/O1/fK/PTXsO1fKkf/previews/1368202781746/thumbnail.png&signature=06e039c01b6d894bb9245124e79404a51919dd08&expires=1368204300000"
},
```

It looks like the pageCount, status, total and thumbnailUri/ls are not being reset properly straight away, making it not possible for the UI to generate a correct preview. Also, it would probably be easier if the `uploadNewVersion` endpoint would return the new content item's basic profile straight away.

This ticket follows up on sakaiproject/3akai-ux#2731