file-upload

Is there a browser file upload solution that can survive connection interruptions? [closed]

こ雲淡風輕ζ 提交于 2020-01-25 11:15:45
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . We are looking for any browser based file upload solution , commercial or free, that manages to survive internet connection interruptions and continues the upload process once the connection is re-established. The scenario: a website used in areas where the users experience very unstable internet connections and

Setup for an uploader (carrierwave)

天大地大妈咪最大 提交于 2020-01-25 11:00:06
问题 I have an image uploader in place following a tutorial using the gems carrierwave and fog. Now I would like to add an additional uploader but am struggling. I have generated the uploader ( rails generate uploader name ). In the model file I have mounted the uploader to the right column ( mount_uploader :column_name, nameUploader ). In the uploader itself I have set def extension_white_list and store_dir . Also I included (since in the tutorial I did the same): if Rails.env.production? storage

upload multiple files to server, and write to database

空扰寡人 提交于 2020-01-25 08:43:07
问题 So at the moment I have the following code in my html <input type="file" required required="required" name="image" multiple=""> and then before I added the mutliple="" tag, this always worked for me, if(isset($_POST['Submit'])) { $current_image=$_FILES['image']['name']; $extension = substr(strrchr($current_image, '.'), 1); if (($extension!= "png") && ($extension != "jpg")) { die('Unknown extension'); } $time = date("fYhis"); $new_image = $time . "." . $extension; $destination="./../img

Multiple file uploads via Javascript/Ajax?

柔情痞子 提交于 2020-01-25 08:33:24
问题 Is there a way to select more than one files to upload when a user clicks the 'Browse' button, and have those files uploaded without refreshing the page? This happens in Gmail, when you click to attach a file you can hold down CTRL and select multiple files. 回答1: I recently faced a similar problem. We had been using Uploadify (http://www.uploadify.com/) to do uploads. I wrote a blog post on how to use Uploadify to perform multiple file uploads: http://blog.bobcravens.com/2011/03/upload

How to upload an image to Slack using node.js on Windows?

瘦欲@ 提交于 2020-01-25 08:05:26
问题 I'm trying to upload an image via Slack using node.js and the request package, but not having much luck. Either I receive invalid_array_arg or no_file_data errors from the API. Here is my request: var options = { method: 'POST', url: 'https://slack.com/api/files.upload', headers: { 'cache-control': 'no-cache', 'content-type': 'application/x-www-form-urlencoded' }, form: { token: SLACK_TOKEN, channels: SLACK_CHANNEL, file: fs.createReadStream(filepath) } }; request(options, function (error,

How to upload an image to Slack using node.js on Windows?

空扰寡人 提交于 2020-01-25 08:04:45
问题 I'm trying to upload an image via Slack using node.js and the request package, but not having much luck. Either I receive invalid_array_arg or no_file_data errors from the API. Here is my request: var options = { method: 'POST', url: 'https://slack.com/api/files.upload', headers: { 'cache-control': 'no-cache', 'content-type': 'application/x-www-form-urlencoded' }, form: { token: SLACK_TOKEN, channels: SLACK_CHANNEL, file: fs.createReadStream(filepath) } }; request(options, function (error,

Pre request script of upload file with multipart/form-data hitting method 2 times in Postman

独自空忆成欢 提交于 2020-01-25 07:33:06
问题 I'm working with API project and writing test cases with Postman for automation to check API status. Here I have one upload method in which user has to upload a file to the server and need to check if the server returns an appropriate response. Upload method accepting the request with multipart/form-data, from Postman I'm passing as below screen: I believe that in order to write a test case, I need to write a pre-request script. pm.sendRequest({ url: pm.environment.get("baseURL") + '/document

How to make so people can upload files to my website and display them?

非 Y 不嫁゛ 提交于 2020-01-25 07:26:09
问题 How to make so people can upload files to my website and display them, for example, I want people to be able to upload books like archive.org. FYI I do not know PHP. Heres my code <html> <head> <title>Book Store</title> <link rel="shortcut icon" href="logo2.ico" /> <link href = "style1.css" type = "text/css" rel = "stylesheet" /> </head> <body> <style> </style> </div> <h1>Book Store</h1> <input type="text" id="booksearch" onkeyup="search()" placeholder="Search for books.."size="40"> <ul id=

How to update a ImageField from views in django

谁说我不能喝 提交于 2020-01-25 07:08:13
问题 Im a bit frustared trying to update a photo from a form. I have this: <form action="/subir-fotos/{{campana_id}}/{{point_id}}/" method="POST" enctype="multipart/form-data" id="form_tomaFoto{{page}}">{% csrf_token %} <input type="hidden" value="{{i.titulo_foto.id}}" name="titulo"> <p><input type="file" accept="image/*" name="foto" required></p> <p><input type="submit" value="Enviar foto" class="boton"></p> </div> </form> My model: class InteraccionFotos(models.Model): campana = models

Doing a PATCH with a file and some fields using multipart/form-data

↘锁芯ラ 提交于 2020-01-25 04:20:10
问题 I am doing a request to my server to patch some regular form fields as well as upload an image. If I do these alone in separate requests all works perfectly, but nothing works if the form data and the file are in the same request. This is what it currently looks like: const file = new FormData() file.append('uploadedFile', uploadedFile, uploadedFile.name) const patch = { name: 'Some Name', age: 18, file } return isomorphicFetch(`${MY_URL}`, { headers: { Accept: 'application/json' } method: