미리보기 이미지 생성 및 업로드시이 스레드를 발견했습니다. 트레드는 첫 번째 이미지를 업로드 한 다음 크기를 조정하고 다시 업로드하여 후속 조치하는 방법을 보여줍니다. 최종 결과는 생산 할 수 있도록 또 다른 단계를 추가하는 쉬운 방법이 있는지 궁금 해서요 원래, 중간 크기의 썸네일Plupload 여러 크기의 미리보기 이미지 만들기
A better solution is to trigger QueueChanged in the FileUploaded handler, and then call refresh. This will initiate the upload again for the same file and you can set a property that you read in the BeforeUpload handler to adjust the file size.
경고 # 1 : 전체 크기 이미지 후에 썸네일을 업로드해야합니다, 그렇지 않으면 전체 크기 이미지에 약간의 버퍼 문제가있어 잘릴 수 있습니다.
경고 # 2 : FileUploaded에 대한 바인드 호출이 uploader.init() 이후에 발생하는 경우에만 작동합니다. 그렇지 않으면 FileUploaded의 업 로더 자체 처리기가 처리기 후에 file.status를 다시 덮어 씁니다.
uploader.bind('BeforeUpload', function(up, file) {
if('thumb' in file)
up.settings.resize = {width : 150, height : 150, quality : 100};
else
up.settings.resize = {width : 1600, height : 1600, quality : 100};
}
uploader.bind('FileUploaded', function(up, file) {
if(!('thumb' in file)) {
file.thumb = true;
file.loaded = 0;
file.percent = 0;
file.status = plupload.QUEUED;
up.trigger("QueueChanged");
up.refresh();
}
}