當前位置:首頁 » 雲伺服器 » 電腦端上傳圖片到伺服器上

電腦端上傳圖片到伺服器上

發布時間: 2022-05-02 09:46:52

⑴ 怎麼從本地電腦上傳文件到伺服器

很簡單.在本地電腦點開始.運行.輸入mstsc後按確定.然後在彈出的窗口中.輸入IP.此時記得點右下角的"選項"-本地資源.

在下方有個"詳細信息".點擊以後.一般有智能卡和串列口兩個選項.

其中串列口就是指的本地硬碟.勾選上以後再遠程連接伺服器.遠程成功以後在伺服器中打開"我的電腦".裡面會顯示你本地的電腦硬碟.把你想上傳的文件直接復制到伺服器即可.

除此以外.你也可以在伺服器上安裝ftp.然後在本地通過FTP把文件上傳.
或者是利用發郵件的方式把文件夾打包發送.並在伺服器上登錄郵件下載.

⑵ 如何將圖片自動上傳至伺服器

在伺服器上架設FTP。
然後讀取圖片信息並保存在本地後,直接後台上傳至FTP伺服器。

⑶ 本地電腦的圖片怎麼上傳到伺服器

如果你是通過後台,打開伺服器,然後把文件拖進去~~~ 如果你是指上傳到網站 網盤等地方。點擊上傳,然後選擇圖片,然後確定。如果沒有上傳這個選項,則上傳不了。

⑷ 上傳圖片到伺服器如何寫代碼

設計里拖一個FileUpload和以個Button
然後在Button_Click事件里寫
string FileName = FileUpload1.PostedFile.FileName.Substring(FileUpload1.PostedFile.FileName.LastIndexOf(@"/")+1);//獲取文件名字,前面的盤符路徑省略;
FileUpload1.PostedFile.SaveAs(Server.MapPath("要上傳的盤符名" + FileName));

⑸ 怎樣將電腦裡面的東西上傳到公司伺服器里

把所有文件打包壓縮,發電子郵件,用U盤也可以,用手機的
內存卡
也行,買個讀卡器10元,
手機內存卡
攜帶最方便。

⑹ 我要在一個網頁上傳一張圖片到伺服器,然後保存圖片的地址,在另一個頁面顯示圖片

public class UploadAction extends ActionSupport {
//接收文件 名稱需要和表單name名稱一致
private File image;
//上傳多個圖片文件
private File[] images;
//上傳文件類型[image]為表單name名稱,ContentType為固定寫法
private String imageContentType;
private String[] imagesContentType;
//上傳文件名稱[image]為表單name名稱,FileName為固定寫法
private String imageFileName;
private String[] imagesFileName;

//上傳一個文件
public String upload(){
//將長傳的文件存儲到images文件夾下,首先根據images名稱得到具體路徑
String realPath = ServletActionContext.getServletContext().getRealPath("images");
File file = new File(new File(realPath),imageFileName);
//如果輸入為空 沒選擇圖片的話
if(image != null){
//判斷文件夾存不存在
if(!file.getParentFile().exists()){
file.getParentFile().mkdir(); //創建一個文件夾
}
try {
FileUtils.File(image, file);
super.addActionError("上傳成功");
} catch (IOException e) {
super.addActionError("上傳失敗");
e.printStackTrace();
}
}
return SUCCESS;
}
//上傳多個文件
public String manyUpload(){
//將長傳的文件存儲到images文件夾下,首先根據images名稱得到具體路徑
String realPath = ServletActionContext.getServletContext().getRealPath("images");
System.out.println(realPath);
File file =null;
if(images != null){
try {
for (int i = 0; i <images.length ; i++) {
file = new File(new File(realPath),imagesFileName[i]);
FileUtils.File(images[i], file);
}
super.addActionError("上傳成功");
} catch (IOException e) {
super.addActionError("上傳失敗");
e.printStackTrace();
}
}
return SUCCESS;
}

public File getImage() {
return image;
}
public void setImage(File image) {
this.image = image;
}
public String getImageContentType() {
return imageContentType;
}
public void setImageContentType(String imageContentType) {
this.imageContentType = imageContentType;
}
public String getImageFileName() {
return imageFileName;
}
public void setImageFileName(String imageFileName) {
this.imageFileName = imageFileName;
}
public File[] getImages() {
return images;
}
public void setImages(File[] images) {
this.images = images;
}
public String[] getImagesContentType() {
return imagesContentType;
}
public void setImagesContentType(String[] imagesContentType) {
this.imagesContentType = imagesContentType;
}
public String[] getImagesFileName() {
return imagesFileName;
}
public void setImagesFileName(String[] imagesFileName) {
this.imagesFileName = imagesFileName;
}
}

⑺ 如何上傳圖片到圖片伺服器

使用一些已有的組件幫助我們實現這種上傳功能。 常用的上傳組件: Apache 的 Commons FileUpload JavaZoom的UploadBean jspSmartUpload 以下,以FileUpload為例講解 1、在jsp端 <form id="form1" name="form1" method="post" action="servlet/fileServlet" enctype="multipart/form-data"> 要注意enctype="multipart/form-data" 然後只需要放置一個file控制項,並執行submit操作即可 <input name="file" type="file" size="20" > <input type="submit" name="submit" value="提交" > 2、web端 核心代碼如下: public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("UTF-8"); DiskFileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload(factory); try { List items = upload.parseRequest(request); Iterator itr = items.iterator(); while (itr.hasNext()) { FileItem item = (FileItem) itr.next(); if (item.isFormField()) { System.out.println("表單參數名:" + item.getFieldName() + ",表單參數值:" + item.getString("UTF-8")); } else { if (item.getName() != null && !item.getName().equals("")) { System.out.println("上傳文件的大小:" + item.getSize()); System.out.println("上傳文件的類型:" + item.getContentType()); System.out.println("上傳文件的名稱:" + item.getName()); File tempFile = new File(item.getName()); File file = new File(sc.getRealPath("/") + savePath, tempFile.getName()); item.write(file); request.setAttribute("upload.message", "上傳文件成功!"); }else{ request.setAttribute("upload.message", "沒有選擇上傳文件!"); } } } }catch(FileUploadException e){ e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); request.setAttribute("upload.message", "上傳文件失敗!"); } request.getRequestDispatcher("/uploadResult.jsp").forward(request, response); }

⑻ 將本地圖片通過地址上傳至伺服器,怎麼操作一次行上傳三張圖片,如圖:

你好朋友;
在那個圖片文件路徑中內;
你輸入你電腦中內的圖片的;
完整路徑;必須是完整路徑;
比如C:\123\456\我愛你.jpg;
然後點擊上傳按鈕就能上傳了;
而你若是不想輸入完整路徑的話;
那就點擊那個瀏覽按鈕;然後你;
在你電腦中內找到你想上傳的圖片;
點擊右下角打開按鈕;然後再按上傳就行了;
朋友這個不難;很簡單的;特別容易操作

⑼ 已知本地文件路徑,怎樣將圖片上傳到伺服器

一般採用的是FTP進行上傳就可以了!可以去伺服器廠商(正睿)的網上找找文件上傳的相關文檔參考一下,應該很快就清楚了!

⑽ 怎麼從本地電腦上傳文件到伺服器

從本地電腦上傳文件到vps或者伺服器.可以有多種方法.
一.如果文件不大.可以在遠程登錄伺服器的選項中.選擇"本地資源"把本地的磁碟映射到伺服器上面.然後登錄伺服器即可看到本地電腦的分區.直接把文件復制到伺服器磁碟即可.
二.可以把要上傳的文件打壓.直接用發郵件附件的功能發送.然後在伺服器或者vps上面登錄郵箱下載到系統磁碟.
三.可以安裝下ftp.比如說用serv-u安裝.然後在本地電腦用flashfxp工具上傳即可.
海騰數據楊闖為你解答.希望對你有幫助.

熱點內容
電信光纖上傳限制 發布:2024-05-18 16:08:05 瀏覽:910
sql中的limit 發布:2024-05-18 16:05:57 瀏覽:895
啟動ug時伺服器無響應是怎麼回事 發布:2024-05-18 15:48:24 瀏覽:372
小數除法的計演算法則 發布:2024-05-18 15:36:52 瀏覽:530
安卓網卡免驅動如何實現 發布:2024-05-18 15:25:15 瀏覽:860
8加6演算法 發布:2024-05-18 15:04:25 瀏覽:738
名圖16款尊享什麼配置 發布:2024-05-18 14:55:37 瀏覽:585
我的世界怎樣刷出32k伺服器 發布:2024-05-18 14:32:32 瀏覽:565
c語言程序設計江寶釧 發布:2024-05-18 14:32:22 瀏覽:780
右擊文件夾總是轉圈圈 發布:2024-05-18 14:31:10 瀏覽:697