upload

Node.js, multer and req.body empty

拜拜、爱过 提交于 2019-11-29 12:27:11
问题 Here it is my problem, I have a form where I can insert a file and a field but I receive only the file and not the parameter test ! Why? This is my code: app.js: var express = require('express'); var bodyParser = require('body-parser'); var app = express(); var port = 8000; var multer = require('multer'); // v1.0.5 var storage = multer.diskStorage({ destination: function (req, file, callback) { callback(null, './uploads'); }, filename: function (req, file, callback) { callback(null, file

Best way to show image previews before upload in rails & carrierwave

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 12:15:49
问题 I've been using rails for past few days and wanted to know what is best way to show image previews before upload in rails & carrierwave. I came across a few options like using plupload or jquery file upload or using uploadify. 回答1: If you only need image preview in a form before upload, you (as me) will see that JQuery Upload plugin is just too much complex and not so easy to run properly (I was able to see the preview, but then I couldn't upload the picture). http://saravani.wordpress.com

problem with uploading captured image in android camera

喜你入骨 提交于 2019-11-29 11:52:38
In my app I am trying to capture an image from my device and I want to upload it to a server. I am following the answer which was posted here Following is my code for starting camera startBtn = (Button) findViewById(R.id.startBtn); startBtn.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { startCamera(); } }); } public void startCamera() { Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE ); intent.putExtra( MediaStore.EXTRA_OUTPUT, outputFileUri ); startActivityForResult( intent, 0 ); } But after i capture and when i try to upload it gets

Is setting the uploads folder 777 permission secure?

我是研究僧i 提交于 2019-11-29 11:33:13
I have seen a lot of upload forms hacked, and some had some really good security checks of the file being uploaded (at least I think so), but still somebody managed to upload a PHP file. I was wondering: is there is a way to upload a file in the uploads folder that has 777 permissions? I am thinking of using HTTP PUT. In general 777 is about as insecure as it gets... that means anybody can read and write to your files. HTTP PUT isn't inherently any more secure than HTTP POST if you're allowing the uploaded files to be exceuted on your server. Overall, if you are allowing arbitrary files to be

PHP Upload IF ISSET always says it is?

孤街醉人 提交于 2019-11-29 11:23:13
OK, i have some kind of strange problem with my code. I'm trying to make uploading form with text along photos. Now, I need to check if the photo is uploaded or the text is inserted only. The simplified code looks like this: if (isset ($_FILES['image'])){ echo 'yes'; } else { echo 'no'; } the form looks like: <form action="" method="post" enctype="multipart/form-data" class="contact-form"> <form action="" method="post" enctype="multipart/form-data" class="contact-form"> <label for="title"><strong>Title</strong> (required)</label> <input type="text" name="title" value="" required> <label><span

Unable to upload large files to Google Docs

此生再无相见时 提交于 2019-11-29 11:09:05
I am uploading documents on Google Docs as: DocumentsService myService = new DocumentsService(""); myService.setUserCredentials("username@domain.com", password ); DocumentEntry newEntry = myService.UploadDocument(@"C:\Sample.txt", "Sample.txt"); But when I try to upload a file of 3 MB I get an exception: An unhandled exception of type 'Google.GData.Client.GDataRequestException' occurred in Google.GData.Client.dll Additional information: Execution of request failed: http://docs.google.com/feeds/documents/private/full How can I upload large files to Google Docs? I am using Google API ver 2. In

HTML multiple file upload from different folders

≡放荡痞女 提交于 2019-11-29 11:04:26
I have a form with an upload field that allows users to select multiple files. However, I need to be able to allow the user to select file 1 from folder 1, then go and select file 2 from folder 2, and so on. Currently, when the user selects file 1 from folder 1 then hits "Open", the selection window closes (leaving the user on my form). Then if the user goes and select file 2 from folder 2 and hits the "Open" button, file 1 is removed, leaving only file 2. Basically, the user is unable to select multiple files unless they're all in the same location. Is there a way to make file 1 stay selected

ftp_login expects parameter 1 to be a resource

非 Y 不嫁゛ 提交于 2019-11-29 10:55:00
I'm trying to upload some files with FTP and I'm having the following error: Warning: ftp_login() expects parameter 1 to be resource, boolean given in /home/content/98/10339998/html/upload.php on line 65 FTP connection has encountered an error!Attempted to connect to thelegendmaker.net.... caused by: // set up a connection to ftp server $conn_id = ftp_connect("thelegendmaker.net"); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); Does anyone know why this is happening? I've tried using no quotes, double quotes, and single quotes and none

image upload with ajax and php

谁说胖子不能爱 提交于 2019-11-29 10:25:03
问题 I want to use ajax to upload image. In this module: On clicking browse and selecting image, it will be uploaded and displayed over file field. After adding title and description, and clicking on the button, that image will be displayed below and upper image field will be blank 回答1: You can't upload files through AJAX. You need to work with IFRAMEs or a Flash-Based uploader. 回答2: Actualy you can upload images with the ajax function in Jquery in atleast the lates version of chrome. HTML: <form

Flex: Error #2038: File I/O Error [closed]

℡╲_俬逩灬. 提交于 2019-11-29 09:47:39
I have a flex app doing multiple file upload, and keep getting this error: Error #2038: File I/O Error Flex gives this error, yet it seems to work because the upload does get processed. This was happening intermittently, now on every attempt. Any ideas on what might be going on here? I've checked that permissions are read/write, google'd something about a trailing slash issue with the url. I'm at a loss as to what could be going on. Are you using an SSL certificate on the server you're uploading to? I've had issues in the past where the Flash Player will randomly fail due to an invalid SSL