1. A computer-implemented method of determining when to pregenerate a target format of a file suitable for providing a preview of the file, the file being stored in a web-based collaboration environment, and wherein the file has an input format, the method comprising: collecting data on user activity for a plurality of files uploaded to the web-based collaboration environment; analyzing the collected data to determine that it is likely for a preview to be requested for a subset of the plurality of files; determining a criteria for the subset; upon determining that a given file meets the criteria, converting a specific input format of the uploaded file to a specific target format; upon receiving a preview request for the given file from a requesting user, using the specific target format to provide the preview of the given file to the requesting user.