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 运动想象脑电信号数据集.vhdr
    • ¥15 三因素重复测量数据R语句编写,不存在交互作用
    • ¥15 微信会员卡等级和折扣规则
    • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
    • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
    • ¥15 gdf格式的脑电数据如何处理matlab
    • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
    • ¥100 监控抖音用户作品更新可以微信公众号提醒
    • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
    • ¥70 2048小游戏毕设项目