dpi96151 2014-10-25 15:38
浏览 154

Plupload以不同的尺寸保存每个图像

I'm using Plupload to upload images to the server. But I would like to save each image in the original way but also as a thumbnail.

That's my code:

$(function() {
$("#uploader").plupload({
    // Allgemeine Einstellungen
    runtimes : 'html5,flash,silverlight,html4',
    url : 'Uploader/examples/upload.php', // Datei führt Upload aus

    // max. Anzahl von Dateien
    max_file_count: 10,

    chunk_size: '1mb',

    // Materialien skalieren, um Ladekapazität der App nicht zu überschreiten
    // Zitat des Docs: "obviously resize is not the best name for the option, since currently we can only downsize"
    // http://www.plupload.com/docs/Image-Resizing-on-Client-Side
    resize : {
        width : 2000, 
        height : 2000, 
        quality : 100,
        preserve_headers: false, // Header von jpg Dateien löschen
        crop: false // crop deaktivieren, damit das Bild gesamt bleibt
    },

    filters : {
        // max. Dateigröße
        max_file_size : '100mb',
        // Dateitypen (Bilder und Videos)
        mime_types: [
            {title : "Image files", extensions : "jpg,jpeg,gif,png"}, //Bidler
            {title : "Video files", extensions : "mov,mp4,m4v"} // Videos (werden von iOS unterstützt)
        ]
    },

    // Nutzer kann die Bilder nicht manuell umbenennen
    rename: false,

    // Nutzer kann Dateien sortieren
    sortable: true,

    // Die abgespeicherten Daten haben einmalige Namen
    unique_names:true,

    // Der Nutzer kann nicht manuell den Upload starten - Button deaktiviert
    buttons:{start:false},

    // DragDrop Feature (currently only HTML5 supports that)
    dragdrop: true,

    // Views to activate
    views: {
        list: true,
        thumbs: true, // Show thumbs
        active: 'thumbs'
    },

    // Alternative , falls Browser nicht unterstützt wird
    // Flash settings
    flash_swf_url : 'Uploader/js/Moxie.swf',
    // Silverlight settings
    silverlight_xap_url : 'Uploader/js/Moxie.xap',

Is there a easy way to achieve this? Unfortunately Plupload doesn't provide such a functionality

Thanks Chris

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 安装svn网络有问题怎么办
    • ¥15 Python爬取指定微博话题下的内容,保存为txt
    • ¥15 vue2登录调用后端接口如何实现
    • ¥65 永磁型步进电机PID算法
    • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
    • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
    • ¥15 如何处理复杂数据表格的除法运算
    • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
    • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
    • ¥15 latex怎么处理论文引理引用参考文献