I'm using the jQuery-file-uploader plugin to let users upload videos (.avi format), which the server then converts to other formats and also extracts a PNG of the first frame to use as a thumbnail. However, I'd like to resize this image using the Javascript callbacks for resizing in the fileuploader, as opposed to the server-side framework (Python, in this case).

How can I manually resize an image using the file-uploader Javascript callbacks? Is this possible? All the plugin callbacks for resizing only appear to be useful during the upload process, which is not helpful to me since I'm not uploading images per se. Is there any way to invoke these callbacks explicitly, perhaps as the page is refreshed after an upload is completed?

EDIT It seems like there have been a lot of other issues with the image resizing on the file uploader, so I instead used Python PIL on the server side to manually create and set the thumbnail image. Not the fix I'd have preferred, but it works just fine.

有帮助吗?

解决方案

You don't say your server-side language, so if it's PHP there is a few function who provide thumbnailing:

I don't really understand your problem with your callback invocation. But if you want to execute something later you can use cron, or queue services (like Iron.io).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top