English 中文(简体)
node.js 连接图像高载到刺 director
原标题:node.js connect-form image upload to tmp directory

https://github.com

The images get saved to /tmp directory. I want to change it from /tmp to some directory that is within the application context. How can I do this ?

最佳回答

您可以确定

req.form.uploadDir = "<your_path>"; 

档案在固定道路上保存。

问题回答

您可使用utils.pump将档案移至其他一些继承人。

充电 Dir :

app.use(express.bodyParser({uploadDir:__dirname+ /uploads }));




相关问题
Using a file form field with a Java servlet

I am tring to retrieve a filename or the file itself for use in a java servlet (from a web form). I have a file form field: <form enctype="multipart/form-data" method="post" action="...

Streaming uploaded files directly into a database table

I have several applications that allow users to upload attachments that are stored inside a database table. This has worked fine for several years because it was initially intended for smallish image ...

Asynchronus File Upload with StateServer Mode

I want to implement Asynchronus File Upload. I ve tried ajax:AsyncFileUpload control. It s working fine only with InProc Mode. But I m using StateServer Mode. Any help from anybody? Thanks in ...

How do CMS upload images?

I am just playing around and trying to make a very simple CMS. Right now I what I do right now is I use "FtpWebRequest" to get the file that they want to change around and stick it into a jquery ...

File does not upload from web form in Django

Howdy - I ve written a very simple app to accept job applications including a resume upload. Running the bundled server for development locally, I can successfully upload files via the web form on ...

热门标签