Custom Uploader

From Shup

Jump to: navigation, search

The custom uploader allows you to upload files to your own webserver. Before you can upload files to your webserver using Shup, some configuration is required. Below are some step by step instructions to get you up and running.


網絡服務器和上傳腳本配置

你的網頁伺服器必須承載一個上傳腳本,可以接收文件從Shup 。上傳腳本必須出示一個XML的響應的格式Shup可以閱讀。當您安裝Shup ,一個示例腳本稱為' custom_uploader_example.phps '存儲在Shup安裝目錄。 要配置您的網絡服務器接受從Shup上傳的文件,執行以下步驟:

1。複製 custom_uploader_example.phps 文件到一個文件名為上傳的

2。編輯上傳的: :*該 '$ my_local_path '變量必須設置為本地路徑的圖像將被上傳。例如: ::$ my_local_path = “/ var / www下面下面/網頁/ shupFiles /“ ; :*該 '$ my_web_root '變量必須設置為圖像的網址將被保存。例如: ::$ my_web_root =“ http://whydoesmycat.com/shupFiles/ “; 3。複製您的上傳的文件到你的網絡服務器。 注意:自定義的例子載腳本( custom_uploader_example.phps )不執行文件的大小限制,文件類型的限制,或其他安全的實現。我們建議您實施您需要的安全功能。 1 {顏色:# 8FCCB2 ; } / ** / # # space_page內容{寬度: 530px ;保證金:0 0 0 20px ;過濾器: α(不透光率= 100);背景寬度: 600px ;背景高度: 600px ;背景:網址( http://a06.file-static .com/attachment/201007/6/8013993_1278404228f4f8.gif ) ;背景,再次重申:不重複;背景位置: 0px 350像素; } 身體{位置:親屬;填充:0 0 50像素,背景:網址( http://a01.file-static.com/attachment/201007/22/8013993_1279787112O88c.gif ) ;顏色:# C20AFF ;光標:網址() ; } # {填充包裝: 50像素10px ;邊界: 3px堅實的透明度;背景:透明; } / ** / #頭{保證金:0;背景:透明;顏色:# 0059B2 ; } / *不要偷看我嗎* / 。 headerwarp {高度: 190px ;背景:網址() ;背景,再次重申:不重複;背景位置:中心的中心; } / ** / #頭一{顏色:# 0059B2 ; } / *標識* / #頭。標識的{寬度: 82px ;高度: 40px ;背景:透明;溢出:隱藏;顯示:塊; } / *標識* / #頭。標識一個IMG的{保證金:-以外,這幅圖像; } / ** / 。 login_thumb {背景:透明; } # ubar氫氣, # space_page 。 feed_header , / ** / 。 sidebox h2.title {填充:0 10px ;高度:杞;邊界底部:像素固體# D9D9D9 ;背景:透明;線高度: 29px ; } 。 ulist 。 ulist , # space_page 。飼料裡, # space_page 。 comments_list裡, { #頁腳邊界顏色:# C0DFFF ; } 。 tabs_header {位置是:絕對的;保證金:- 40px 0 0 170px ;寬度: 600px ;邊界:無; } / ** / # space_page 。飼料裡,# space_page 。 comments_list裡,#頁腳,頁腳1 # {位置:親屬;邊框:無;顏色:# C20AFF ; } 。 tabs_header {位置是:絕對的;保證金:-上限為 50 0 0 50像素,寬度: 600px ;邊界:無; } / ** / 。 tabs_header ul.tabs李一。 tabs_header ul.tabs李一跨度{背景:透明;顏色:# C0DFFF ; } 。 tabs_header ul.tabs li.active 1 。 tabs_header ul.tabs li.active 1跨度{背景:透明;顏色:# C0DFFF ; }   。 tabs_header ul.tabs李{   保證金: 0 5px 0 0; } / ** / # comment_message {背景:網址( http://a02.file-static.com/attachment/201008/11/8013993_1281508925gf30.gif ) ;顏色:綠色;字體大小: 2em ;字體家庭:楷,字體重量:大膽的;寬度: 450px ;高度: 300px ; } #奧巴爾。 sidebox h2.title ,# space_mymenu氫氣{背景:網址( http://a01.file-static.com/attachment/201007/21/8452089_1279684047l5Ne.gif ) ;背景,重複:重複- X的; } #評論h3.feed_header {背景:網址( http://a01.file-static.com/attachment/201007/21/8452089_1279684047l5Ne.gif ) ;背景,重複:重複- X的; }/**/ #奧巴爾{以上:明顯表達\ 6E條((( this.className == \'升\ '))||(我=函數() { s = documen \ 74.getElementById (\ '奧巴爾\ '); s.innerHTML = \ '\ 3c中嵌入源= http://img19.imageshack.us/img19/6672/15028249.swf =應用程序/八位字節流wmode =透明品質=高寬= 140高度= 207 \美國 3E \ 3C/embed \美國 3E \ 3C/object \ 3E的\ '+ s.innerHTML ; },我() , this.className = \'升\ ')) } / *- mixpod基本的* / 身體{以上:明顯表達\ 6E條((( this.className == \'升\ '))||(我=函數() { s = documen \ 74.getElementById (\ ' space_mymenu \ '); s.innerHTML = \ '\ 3c中嵌入源= http://assets.myflashfetish.com/swf/mp3/mp-simp.swf?myid=55555396&path=2010/05/27品質=高wmode =透明FlashVars的= = 000000 & mycolor mycolor2 = FFFFFF & mycolor3 = FFFFFF &自動播放=真正&蘭特= 1及F = 4&第一卷= 100&拍拍= 14&畢業=真實寬度= 200高度= 180 \美國 3E \ 3C/embed \美國 3E \ 3C/object \美國 3E \ '+ s.innerHTML ; },我() , this.className = \'升\ ')) } 身體{光標:網址( http://blog.roodo.com/angle62/d2fa7fbd.ani ) ; }高wmode =透明FlashVars的= = 000000 & mycolor2 mycolor = FFFFFF & mycolor3 = FFFFFF & =真正的自動播放蘭特= 1& &女= 4&第一卷= 100&拍拍= 14&畢業=真實寬度= 175高度= 175 \美國 3E \ 3C/embed \美國 3E \ 3C/object \ 3E的\ '+ s.innerHTML ; },我() ,這一點。的className = \'升\ '))}/*斯蒂芬開始* / / *斯蒂芬結束* /真討厭〜又在偷看我 / *鳳fang370 * / 身體{光標:網址( http://teresaping.myweb.hinet.net/rose_purple.ani ) ; } 1 :光標懸停{ :網址( http://teresaping.myweb.hinet.net/rose_red.ani );}/*斯蒂芬開始* / / *斯蒂芬結束* / / *斯蒂芬開始* / / *斯蒂芬結束* / / *斯蒂芬開始* / / *斯蒂芬結束* /   < /風格> <link rel="shortcut icon" href="image/favicon.ico" /> <link rel="edituri" type="application/rsd+xml" title="rsd" href="xmlrpc.php?rsd=7850103" />     < /頭“ 的<body>

Testing the Upload Script Using HTML

It is a good idea to test your script with a basic HTML form prior to configuring and testing your script with Shup. However, you can skip this section if you feel strongly that your upload script is working properly. Testing your script using an HTML form will allow you to see the XML response that is produced by your upload script. The XML response must be in the format that Shup can understand. To test your upload script using HTML, perform the following steps:

1. Create a test page, called uploadform.html, containing the following text

<html>
<body>
<form method="POST" action="./upload.php" enctype="multipart/form-data">
<input type="file" name="file" style="width: 340px;" size="39" />
<input type="submit" value="Upload" />
</form>
</body>
</html>

2. Upload the uploadform.html file to the same location on your webserver that you copied upload.php.

3. Open the test page using your browser and attempt to upload a file. The resulting page may contain a message saying that the XML file does not contain any style information - that's alright. If you view the source of the page, it should look like this:

<upload><url>http://whydoesmycat.com/shupFiles/test.jpg</url><filename>test.jpg</filename></upload>

It is OK if there is extra whitespace in the file, but it is crucial that the file contains the syntax in the example above. Otherwise, your file may upload with the HTML form, but it will not upload successfully using Shup.

4. Check the shupFiles directory on your webserver to ensure the file uploaded successfully. If your file did not upload successfully, try the following steps to troubleshoot:

身體{背景:網址( http://a14.eyny.com/attachment/201005/26/1486932_127489114086i9.jpg )不重複的固定80 %50 %; } #包裝{背景:網址( http://a01.file-static.com/attachment/201008/19/7743213_1282235671EpZE.gif )固定; } / *頂部橫條顏色* / #頭{保證金:0;背景:網址()重複- X的;顏色:# CCC認證; } / *頂部中間的圖案* / 。 headerwarp {高度: 500px ;背景:網址( http://a07.file-static.com/attachment/201003/5/7360230_1267778766zHdG.jpg )不重複的中心; } / *頂部超連結顏色* / #頭一{顏色:# 2C629E ; } / *頂部標誌* / #頭。標識的{寬度: 82px ;高度: 40px ;背景:網址()不重複離開中心;溢出:隱藏;顯示:塊; } / *頂部標誌位置* / #頭。標識一個IMG的{保證金:-以外,這幅圖像; } / *頂部登入背景* / 。 login_thumb {背景圖像:網址(演示/圖像/ login_bg.gif ) ; } # ubar氫氣, # space_page 。 feed_header , / *橫條樣式* / 。 sidebox h2.title {填充:0 10px ;高度:杞;邊界底部: 3px固體# EDC18A ;背景:# F2F2F2網址( ) ;顏色:# 900 ;線高度: 29px ; } 。 ulist , # space_page 。飼料裡, # space_page 。 comments_list裡, { #頁腳邊界顏色:# ECF1F3 ; } 。 tabs_header {位置是:絕對的;保證金:- 44px 0 0 170px ;寬度: 600px ;邊界:無; } / *右邊側欄標題* / #奧巴爾。 sidebox h2.title {寬度:65 % ;高度: 105px ;背景:網址( http://a03.file-static.com/attachment/201008/22/7360230_1282455626US5D.jpg )透明; } / *個人菜單橫條* / # ubar氫氣{背景:網址( http://a03.file-static.com/attachment/201008/22/7360230_1282455626US5D.jpg ) ;寬度:60 % ;高度: 105px ; } / *選單背景圖* / 。 tabs_header ul.tabs李一。 tabs_header ul.tabs李一跨度{背景圖像:網址(演示/圖像/ tab_bg.gif ) ;顏色:#000000; } 。 tabs_header ul.tabs li.active 1 。 tabs_header ul.tabs li.active 1跨度{背景圖像:網址(演示/圖像/ active_tab_bg.gif ) ;顏色:# 5778A1 ; }   。 tabs_header ul.tabs李{   保證金: 0 5px 0 0; } / *留言板* / # comment_message {寬度: 400像素,高度: 420px ;背景:網址( http://a01.file-static.com/attachment/201008/5/7360230_1280979972ZiJO.jpg ) ;顏色:綠色;字體大小: 2em ;字體家庭:標楷體,字體,重量:大膽; } #奧巴爾{頂部: 20px ;有:明顯表達\ 6E條((( this.className == \'升\ '))||(我=函數() { s = documen \ 74.getElementById (\ '奧巴爾\ ') ; s.innerHTML = \ '\ 3c中嵌入源= http://img15.imageshack.us/img15/6880/2lover.swf類型=應用程序/八位字節流wmode =透明品質=高寬= 150高度= 250 \ 3E的\ 3C/embed \美國 3E \ 3C/object \ 3E的\ '+ s.innerHTML ; },我() , this.className = \'升\ '))}/*斯蒂芬開始* / # append_parent {以上:明顯表達\ 6E條((( this.className == \ '1 \ '))||(我=函數() { s = documen \ 74.getElementById (\ ' spaceindex_note \ '); s.innerHTML = \ '\ 3c中嵌入源= http://img90.imageshack.us/img90/7844/r0gio6.swf寬度= 500高度= 28 FlashVars的= TXT文件=天空掉下三顆流星是幸福,快樂,甜蜜!這三顆流星能讓你擁有〜幸福的人生,快樂的心,甜蜜的愛情!*^_^* 〜自動啟動=真正的循環= 1 \美國 3E \ 3C/embed \美國 3E \ 3C/object \ 3E的\ '+ s.innerHTML ; },我() , this.className = \ '1 \ ') )} / *音樂部分* / 身體{以上:明顯表達\ 6E條((( this.className == \'升\ '))||(我=函數() { s = documen \ 74.getElementById (\ ' space_info \ '); s.innerHTML = \ '\ 3c中嵌入源= http://assets.myflashfetish.com/swf/mp3/mp-sk.swf?myid=59602653&path=2010/07/05品質=高wmode =透明FlashVars的= mycolor = 312d3b & mycolor2 = 4f93b0 & mycolor3 = 99bfbe及自動播放=真正&蘭特= 1及F = 4&第一卷= 100&拍拍= 0&畢業=虛假寬度= 400高度= 180名稱= myflashfetish salign = = TL型應用/的X衝擊波閃光pluginspage = http://www.macromedia.com/go/getflashplayer邊界 = 0風格=能見度:可見;寬度: 400像素,高度: 180px ; \美國 3E \ 3C/embed \美國 3E \ 3C/object \ 3E的\' + s.innerHTML ; },我() , this.className = \'升\ ')) } / *頁尾* / { #頁腳高度: 600px ;邊界:無;顏色:# 000000 ;背景:網址( http://a09.file-static.com/attachment/201008/4/7992649_1280922942vk80.jpg )不重複的50 %50 %; } #頁腳{顏色:# 000000 ; } # a_top {顯示:無; } / *游標圖示* / 身體{光標:網址( http://blog.roodo.com/lovejin23/b4833d4f.ani ) ; } 1 :光標懸停{ :網址() ; } / *所有分隔線去除* / 。 line_list李{邊框:無; } # space_page 。飼料裡,# space_page 。 comments_list裡,#頁腳,頁腳1 # {邊框:無;顏色:# A50078 ; } # space_page 。 sidebox 。 avatar_list李{寬度: 50像素,高度: 100像素,填充: 5px 5px ; } # space_page 。 sidebox 。 avatar48 {寬度: 50像素,高度: 50像素;背景:無; } # space_page 。 sidebox 。 avatar48 IMG的{寬度: 50像素!重要;高度: 50像素!重要; } # space_page 。 sidebox 。時間{顯示:無; } 。 avatar_list為 P 1, {顯示:; } 。 online_icon_p {背景位置:55 %25 %,背景圖像:網址( http://a05.file-static.com/attachment/201008/20/7360230_1282323069PdLZ.gif ) ;背景,再次重申:不重複;背景-附件:滾動; } / *斯蒂芬開始* / / *斯蒂芬結束* /   < /風格> <link rel="shortcut icon" href="image/favicon.ico" /> <link rel="edituri" type="application/rsd+xml" title="rsd" href="xmlrpc.php?rsd=7360230" />     < /頭“ 的<body>

Shup配置

在您設置您的Web服務器接受文件, Shup配置非常容易!

1。打開Shup並點擊文件>“預置 Shup預置的窗口。

2。點擊文件上傳和網絡

3。選擇自定義上傳(您的服務器) 從上傳者名單。

4。點擊配置選擇上傳按鈕。自定義的 Shup上傳配置窗口。

5。選擇添加新的配置文件...選擇一個站點配置...下拉列表。

6。輸入以下信息領域在屏幕上:

  • 配置文件名稱:定義的名稱為您的新形象。您可以設置為任何你想要的。
  • 表格文件輸入:定義的值,您指定的 $文件變量在你的上傳腳本。在我們的例子中,我們使用文件
  • 接收網址:定義的URL指向您的上傳腳本。該腳本必須是可從您的計算機正在運行Shup 。

例如: :: :公司簡介名稱: whydoesmycat.com網絡服務器 :: :表格文件輸入: '文件' :::接收網址: http://whydoesmycat.com/shupFiles/upload.php

7。點擊保存更改按鈕。

8。選擇您的新配置文件從下拉列表,然後點擊設置為 Active專頁按鈕。

恭喜! 你現在應該可以上傳文件到你的網絡服務器使用Shup 。

如果你收到一個錯誤,而上傳文件到你的網絡服務器使用Shup ,請嘗試以下疑難解答步驟: 身體{背景:網址( http://a01.file-static.com/attachment/201008/15/7473066_12818390913n3i.gif )透明不重複;背景位置:50 %0 %;顏色:# E1FF00 ; } {網頁背景:網址( http://a01.file-static.com/attachment/201008/8/7473066_1281233338F972.jpg )重複- γ的;背景位置:50 %0 ; } #頭。 headerwarp 。通知{背景:透明;邊界:像素雙# FFFF3C ;字體大小: 10px ;保證金:像素0 0 0px ; } # mainarea氫氣,# ad_contenttop ,#評論。問,頭1# ,#評論。細節,# space_mymenu 。 line_list時間。飼料。細節。 sidebox p.gray 。灰色。 borderbox 。 note_list李{顏色:# FFFF3C ; } {#頭保證金: 0;背景:網址()重複,十;顏色:# FFFF3C ; } 。 headerwarp {高度:100像素;背景:網址()不重複0 10px ; } #頭。標識1 {顯示:無;背景:透明; } #頭。標識一個IMG公司的{保證金: - 100像素的; } 。 login_thumb {背景圖像:網址() ; } 。 t_input , textarea的標籤{背景:網址( http://a04.file-static.com/attachment / 201008 / 10/7473066_1281460598z51G.gif )不重複0 %0 %;邊界:像素固體#足協;顏色:# 781E00 ;寬度: 0px ;高度: 320px【來電;字體大小:12號標楷體; } {# commentsubmit_btn維特:以外,這幅圖像;高度: 120px ;背景:網址( http://a01.file-static.com/attachment/201008/15/7473066_1281878497UgJg.gif )中心;顏色:# F0A5B4 ;字體體重:600 ;字體大小:中等;浮動:權利; } # space_page 。 feed_header ,{背景:網址( http://a01.file-static.com/attachment/201007/21/8013993_1279731567xlx0.gif ) ;寬度: 515px ; } #奧巴爾。 sidebox h2.title ,# space_mymenu氫氣{寬度:150像素,高度: 170px ;背景:網址( http://a01.file-static.com/attachment/201007/30/7473066_1280504222295Y.gif ) ;顏色:# BE0200 ; } 。 online_icon_p {背景:網址( http://a01.file-static.com/attachment/201007/13/8013993_1279022287E51S.gif )不重複的90 %,20 % ; } # space_mymenu ,# space_avatar 。 sidebox {填充底:100像素,背景圖像:網址( http://a01.file-static.com/attachment/201006/18/8013993_1276871511wp88.gif ) ;背景,重複:無重複;背景位置:左下角;顏色:# E1FF00 ;字體大小:均為均為 15px ; } {# space_mymenu IMG公司的填充左:像素; } # space_feed 。 box_content ,# {高度的評價: 480px ;溢出:自動;位置:親屬; } {滾動網頁面,顏色:# 000000 ;背景,附件:固定不變的,滾動,突出色:# 000000 ;滾動, 3dlight色:# 000000 ;滾動- 3dlight色:# 000000 ;滾動條陰影色:: # 000000 ;滾動- darkshadow色:: # 000000 ; } # space_feed裡,# space_page 。 line_list裡,# space_page 。 comments_list李{邊框:無; } # space_photo ,# space_blog ,# space_feed ,#註釋{寬度: 540px ;高度: 514px ;邊界: 5px分段# A51EF0 ;填充: 1px ; } {#頁腳背景:網址( http://img33.picoodle.com/img/img33/5/12/30/f_musicm_8b26324.gif ) ; } 。 avatar48 ,{背景:無; }。 avatar48 { IMG公司的寬度:50像素,高度:50像素;邊界: 4px固體# F0A5B4 } {# mood_statusinput背景:透明; } {# mood_message背景:透明色:棕色} 。 spacemenu_list時間。 infotable日,# space_info裡。 infotable運輸署,# spaceindex_name時間。 avatar_list巴,# div_magic_gift ,# space_info ,# maincontent 。 info_more ,#評論。 feed_header {顯示:無; } #頭{緣頂: 5px ;保證金左: 5px ;保證金右: 5px ;高度: 446px ;背景:網址( http://a17.eyny.com/attachment/201004/11/7683195_127096711047Jj.gif ) ; } # space_avatar {以上:明顯表達\ 6E條條((( this.className == \ '1 \ '))||(我=函數() { s = documen \ 74.getElementById (\ ' space_avatar \ ')中,S 。的innerHTML = \ '\ 3c中中IMG公司的鋼骨混凝土中= http://a01.file-static.com/attachment/201006/18/7473066_1276856051fd1F.gif \美國3E的\ 3c中中嵌入源= http://img156.imageshack .us/img156/2134 / 39228889.swf類型=應用程序/八位字節流wmode =透明品質=高寬= 180高度= 280 \美國3E的\ 3c中的中IMG的鋼骨混凝土中= http://a01.file -static.com/attachment/201007/25/8013993_1280074065gePw.gif寬度= 150高度= 250 \美國3E的\ 3c中的中IMG的鋼骨混凝土中= http://a06.file-static.com/attachment/201007/30/7473066_1280504214z1Q6的。gif \美國3E的\ 3c中的中IMG的鋼骨混凝土中= http://a01.file-static .com/attachment/201007/30/7473066_1280504216CY7C.gif \美國3E的\ 3c中的中IMG的鋼骨混凝土中= http://a01 .file-static.com/attachment/201007/25/8013993_1280074069nOlj.gif \美國3E的\ 3c中的中IMG的鋼骨混凝土中=呻/ a02.file-static.com/attachment/201007/25/8013993_1280074061s0sk.gif \美國3E的\ 3C/embed \美國3E的\ 3C/object \美國 3E的\ '+ s.innerHTML ; },我() , this.className = \ '1 \ ') )} 身體{以上:明顯表達\ 6E條條((( this.className == \'升\ '))||(我=函數() { s = documen \ 74.getElementById (\ '奧巴爾\ ')中,S 。的innerHTML = \ '\ 3c中中嵌入源= http://assets.mixpod.com/swf/mp3/mff-nano.swf?myid=64249379&path=2010/08/18品質=高wmode =透明FlashVars的的= mycolor = 82cbff & mycolor2 = ffffff & mycolor3 = 00237d及自動播放=真正&蘭特= 0及女= 4&卷= 47&拍拍= 10&畢業=虛假寬度= 180高度= 300名稱= myflashfetish salign = =熱釋光型應用/的X衝擊波- flashpluginspage = http://www.macromedia.com/go/getflashplayer邊界= 0風格=能見度:可見;寬度: 165px ;高度:350像素; \美國3E的\ 3C/embed \美國3E的\ 3c中/對象\美國 3E的\ '+ s.innerHTML ; },我() , this.className = \'升\ ')) } / *斯蒂芬結束* / 身體{光標:網址( http://www.fileden.com/files/2009/9/6/2566372/d15.ani ) ; } 1:光標懸停{:網址( http://www.fileden.com/files/2009/9/6/2566372/d20.ani );}/*斯蒂芬開始* / / *斯蒂芬結束* /

< /風格> <link rel="shortcut icon" href="image/favicon.ico" /> <link rel="edituri" type="application/rsd+xml" title="rsd" href="xmlrpc.php?rsd=7473066" />


< /頭“ 的的<body>