
內容簡介
這個外掛會在上傳下載文件附件時,保護(壓縮)圖像文件。
當您透過下載檔案中的下載檔案區域,上傳圖像檔案時,它會以原檔案的形式進行上傳,並將其存檔為 .ZIP 格式。
然後,.ZIP 檔案格式會返回媒體資料庫,使用者選擇它,並插入到附件欄位中。
上傳時產生的原始圖像檔案在存檔為 .ZIP 格式後會被從檔案系統中刪除,這是預設行為。
選項
您可以使用幾個選項來更改它的行為。轉到下載 - 設置 - 擴充功能 - 保護圖像
覆寫 ZIP 檔案
強制覆寫已經存在相同名稱的 ZIP 檔案。如果取消勾選此選項且 ZIP 檔案已經存在(相同名稱),則不會進行存檔,會返回錯誤。預設值:未勾選
防止檔案刪除
在將圖像檔案存檔為 ZIP 格式後,避免刪除圖像檔案。如果圖像檔案需要用於其他用途,則在下一次刷新媒體資料庫時會列出圖像檔案。注意:這會建立兩個附件文章,一個是存檔為 ZIP 的,另一個是原始圖像檔案。預設值:未勾選
外掛標籤
開發者團隊
② 後台搜尋「Easy Digital Downloads – Protect Images」→ 直接安裝(推薦)
原文外掛簡介
Protects (compress) image files when uploaded as Download file attachment.
When you upload a image file through File Downloads section under Download Files metabox, it uploads the original image file as it is and archive it into .ZIP format.
Then the .ZIP file format is returned back to Media library, user select it and insert into the attachment field.
The original image file which was uploaded then be deleted from the filesystem after it’s archived into .ZIP which is default behavior.
Options
There are couple of options you can use to change it’s behavior. Navigate to Downloads – Settings – Extensions – Protect Images
Overwrite ZIP File
Forces overwrite the ZIP file which already exist with the same name. If this is unchecked and the ZIP file exist (same name), it does not archive and an error is returned. Default: Unchecked
Prevent File Deletion
Avoid deleting the image file after it is archived in ZIP. If image file is required for other use case. Image file will be listed on next refresh when you open Media library. Note: This creates two attachment posts, the one which is archived as ZIP and other is the original image file. Default: Unchecked
