Upload to FTP

簡介

這是一個可以讓你輕鬆將附件上傳到指定的 FTP 之外掛,讓圖床的運作更佳的省時省事!
WordPress 官方網站外掛目錄中的本程式

下載

需要的使用者請由你部落格的後台中進行新增的操作。

協助翻譯

如果你製作了本外掛的翻譯之後,願意分享給大家使用的話,歡迎你回報給我。
請於本文章留言給我,並告知我何處取得你製作的翻譯,當然也可以單純說有翻譯要加入,因為迴響是強制需要填寫 E-mail 的!!~~

注意事項

本外掛目前處於研發階段,有任何的建議或是問題請留言討論之。
有你的協助本外掛會發展得更為順暢與好用!

外掛歷史

請前往 Upload to FTP 版本歷史 觀看。

贊助

可以透過 進行,又或者你的 Paypel 帳戶不是台灣區帳戶的話也可以透過 PayPal.Me 進行。

  • 迴響
  • 引用

How to set the HTML link url?
When update 12.10, the HTML link never OK now, previous version works great.
BTW, my previous HTML link is https.

update to Version 1.0.3?

The setting HTML URL link don’t change at this version.
And in my system can set into https URL

yes,1.0.3.
because of my upload and delete status is OK,so I ran some test,and i think i found the problem:
I don’t if you just upload a test-file.txt(which content is “abcd…xyz”) to the “FTP Directory” and visit the “HTML link url” and compare the response content, during the “Save & Test Changes” time, I can visit the file with Chrome,but the file is empty, if the file is not exist, it will give me a 404 error.
but when using FileZilla my FTP server works perfect, so was my “HTML link url”.
I just wanna know why the “File Link Status” is always error…

Testing process is
1. upload the test-file.txt to FTP ( check for upload status )
2. check the HTML link to test-file.txt is exist and content is “abc…xyz” ( check for File Link Status )
3. the delete the test-file.txt ( check for delete status )

If you get upload and delete status OK, File Link Status ERROR.
there is two possible reason
1. the HTML link url is not the same dir with FTP upload dir.
2. get the test-file.txt OK but the html content is not “abc…xyz”

I think the problem is the html content is not “abc—xyz”, and i think it may be UNICODE or UTF-8’s problem.
My ftp server is UTF-8, I don’t know if the plugin can hanlde it.
Later I’ll try again with all plugin disabled, hope to find out the problem.

Hi elfive
Plugin don’t set any encode with ftp or get html content.
I will try to add encode mode with ftp or get html action.

Hi elfive.
I updated the plugin to 1.0.4.
If get test file error OR file ccontent not “abc—xyz”, won’t do the delete test.
So in you case, the test file will keep On FTP let you know is real get error OR setting error.

hi
I using ur plugin, its very good. But i want to use it beside easy digital download, and store my product file in another ftp site, when use ur plugin at download time, edd shows a temporary download link, but when browser goes for download the link convert to original link at ftp server and everything that edd has hidden, will shows to everyone.
Is it a way for ur plugin to work like uploading, when user wants to download a file ? it means maybe the wordpress server get the original file from ftp server and the pass it to the end user (like when it is at upload, which get the original file from user and pass it to the ftp server).

thanks alot.

Some themes will produce small pictures
Srcset The linked image is the old URL
How to set up?
thanks

Sorry for so long time to answer this.

this question is base on the theme how to build the small image and get the image url.
If use the WordPress function to do that, I think i will work nice.

If your theme is free. Let my know the url to get the theme, then I and find the question to fix my plugin

您好,想請問這個可以使用sftp協定登入嗎?
我使用了中國大陸網友和您的plugin測試過,目前似乎因為無法用sftp登入的關係,所以即使我所輸入的登入資訊是正確的,但也無法登入
(我用的是linode的VPS,裡面裝了Ubuntu

在將來的版本上會支援 SFTP 的運作。
不過何時會完成這部分的功能,我就無法給你答案,只能請你等待或是尋求其他的外掛支援。

將外掛加入了 sftp 的支援。
不過目前僅支援使用 帳號/密碼 的登入方式,尚未支援 金鑰 的登入方式。

The plugin don’t setting any file size limit.

If you hava a big size file upload fail.
I think you need try to increase some php setting like “post_max_size”, “upload_max_filesize”, “max_execution_time” or “memory_limit”.

想請教一下 在未作參數修改情況
只是將網站搬至其他主機同為 cPanel
原本檔案刪除狀態為 “可以刪除”
但是換台主機後便顯示 “不可以刪除”

圖片連結:https://i.imgur.com/7QYQ9Qy.jpg

導致網站佈景是吃媒體庫的檔案
無法直接從後台刪除,這問題有解?
已確定 FTP 屬性為預設且可正常連線
這部分請專業 Richer 協助解答了 謝謝

以程式面來說【刪除檔案】的狀態,並不會影響到檔案上傳至遠端主機的動作。
也不會影響到於媒體庫執行檔案刪除的動作,只是在執行刪除的動作的時候,是否會連動去刪除遠端的檔案而已。

建議可以嘗試於後台重新執行一次【儲存 & 測試 變更】。

瞭解了!! 重新執行【儲存 & 測試 變更】
以及外掛重安裝問題依舊 找不到出錯地方
其實程序只是差在遠端連動得要手動刪除
後來又用台備用主機又正常 還是搞不懂哪邊參數有問題
只好在摸索看看 如有找到答案我在來回報

我有想到一個可能的誤判情況
目前遠端刪除是否正確運作的判斷,是在執行刪除之後,再嚐試取得之前上傳的測試檔案,如果得到的回應代碼為 404 才會判斷為刪除成功。

可以進入 FTP 當中,觀看設定上傳的那一個目錄當中,看有沒有一個名為 test-file.txt 的檔案(內容應該為 a-z 共 26 個小寫英文字母),如果該檔案不存在,就可以確認是被誤判了。
不過為何在不同的伺服器之下會發生不同的情況,我就要再嚐試研究了。

經過測試,發現到如果遇到我的問題
是因為搬家導致所謂“不可以刪除”情況
我在新主機 FTP 手動建立 test-file.txt
內容也包含 a-z 共 26 個小寫英文字母
然後再重新執行【儲存 & 測試 變更】
就會顯示為 “可以刪除” 情況
並且檔案上傳到媒體庫後刪除也能連動
後續檢查原本 test-file.txt 檔案
好像檢查可運作會被自動刪除??
或許也是因為這原因導致搬家後外掛誤判
以上是我後來測試後的一些情況反饋
留待未來外掛新版 Richer 將這小 Bug 修復
辛苦了 感謝 ^^

恭喜可以順利運作。

在未來的版本,會改善目前的測試流程。希望可以再發生錯誤的時候完整的呈現錯誤訊息,讓使用者可以更清楚的知道可能的問題點。

hi
The plugin works correctly But 300×300 Crop File Size is 0kb and dont show in post thumbnail.
please check this problem.
thanks.

Hi hadi
Thank you for using this plugin.

Please goto upload-to-ftp setting page, change to basic tab. Set the option “Delete Auto build local file” to “disable”.

Reupload the error image, and check is the local 300*300 crop file size.
If the local file size is 0kb, I think the question is not at the plugin.
If only the remote file is 0kb, I will try to fix this problem.

thank you
when disable “Delete Auto build local file” option , Works fine.
but original file and all cropped files stayed in host.
I do not want the files to stay in the hosts.
thanks.

I suggest to set disable “Delete Auto build local file” option, is want to know the problem is WordPress build the crop image error OR the plugin upload file error.
So the local 300*300 crop image is right, but upload to the FTP become a 0kb file.
Since it work fine at my website, so I don’t know can find out the problem or not.
Hope I can fixed this problem.

Hello, I recently learned of this plugin, and it is very useful, thanks, but in the case of the host I use, it has a certain folder “/ htdocs” as if it were “public”, but in reality this directory does not appears as if it were in the ftp “/ htdocs /” but only “mysite.com” appears, using the plugin in the directory part, it is necessary to put the “htdocs” dir in the view of that loaded image, this dir also appears thus “mysite.com/htdocs/img.jpg” that results by not finding, however this image was uploaded and is in “mysite.com/img.jpg”, could help me how to prevent this “ftp dir” from appearing in image upload link loaded? I looked at the code but I’m not very programming …

sorry, I already managed to adjust this by removing the dir option from load file, but now I have other issues like: Upload images to different folders, I use a website to post sleeves, I’m from a fansub, and I’m using Upload to FTP to use as a second option to see the images that will be allocated on a server managed by us, but the images are from names like “01.jpg, 02.jpg” and is being uploaded to just a folder so giving some image viewing bugs, I would like that when uploading images inside a post, that the place where it will be loaded will be equal to the category category of the post along with another information that is signed as a custom field ex: “mysiteftp .com / CategoryOfPost / ValueOfCustomFieldOfPost / namefile.jpg “, could you help me please? PS: An idea of ​​mine that could be good for the plugin, put option of several ftps, some use servers that have inodes and limit upload, so if it had an option where it could register several FTP’s and that could determine in the setting Upload to FTP in which wants to upload at that time, and if it has been ugly uploading to other ftp, the old ftp links will be kept. PPS: Another thing would be that from what I noticed when uploading to FTP, it also uploads to the local server, but by deactivating the plugin the one that was loaded will appear blank even though having the copies on the local server, so it becomes useless to upload a copy to the local server and it will not be visible in the gallery

PPPS: I know it can be difficult, but I would not have how to apply upload to Imgur via API? has a free plugin that does this “imgur-upload” which is a generic of a paid one, but the problem is that it can only select one image at a time, so if you had how to make the gallery be connected via API … the api imgur allows you to upload, load, rename, delete, and grab the images as direct link, etc. .. then it would just change the information so it suits for the API’s, I do not do it because I’m really not good with programming

1. the dir of link quertion.
If you need link the file as “mysite.com/img.jpg”, set the “HTML link url” as “http://mysite.com/”.
then set the “FTP Directory” to the dir which the web server using to show the “http://mysite.com/”.

2. If you need to upload file in a custom folder base on post_type or category. You need to find other plugin to do this. “upload custom folder” can help you find some plugin, hope you can find ont to help you.

3. Support multiple FTP. Sorry, won’t happen in this plugin.

4. when you upload image, WordPress need to make some different size of image. It only work at local server. after that the plugin upload file to remote server by FTP. If you don’t need to keep local file, you can set the option “Delete Auto build local file” enable, to delete local file after upload to remote server.

5. use “WordPress Imgur” in google, you can find a lot of plugin to work within Imgur.
because I don’t use Imgur, so can’t tell you which one can help you.

不知道为什么,在服务器上用sftp命令连接sftp服务器是没有问题的,上传文件都没问题,但是用插件就是会提示这个
Connect and Login: Test Complete

Upload file: Testing
Open directory /home/wwwroot/ failure.
请问作者这个是什么问题呢?

根據你提供的內容,外掛可以正常的登入到 SFTP 當中,但是無法進入你你指定要上傳資料的目錄當中。

先嘗試目錄使用 / 看看可不可以。
每一個人的 SFTP 設定不同,無法替你解決你系統上的權限問題。

在一个老网站上测试,用如下sql修改老图片路径后,插件不能上传到ftp服务器中。
UPDATE YourDBName_posts SET post_content = REPLACE( post_content, ‘YourOldUrl’, ‘YourNewUrl’ )

本外掛,不會對任何既有的圖片進行處理。
只會在啟用外掛且設定正常的情況下才會將上傳的處片進行轉傳到 FTP 的動作。

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *