upload

Upload a file with php curl from a client to server?

∥☆過路亽.° 提交于 2019-12-13 02:13:43
问题 I'm trying to upload a file automatically from a client-side script which opens a PHP page in my server sending a local path as a GET param. This is a simple python script. My problem is, I can not just fill in the value of an input type file and auto-post the form because for security reasons this doesn't work. So, I thought of using Curl, but then I realized... I have no way of accessing a $_FILES['myfile']['tmp_name'] in my server because this is only posted with a multipart/form-data form

Django FILES upload: path and filename

有些话、适合烂在心里 提交于 2019-12-13 02:13:16
问题 When an uploaded file is received by the Django server, its name can be read using UploadedFile.name If filename in the multipart-data content contains a path like: '/a/b/c', UploadedFile.name seems to contain '/c' . How can I retrieve the full path and not just the file name. Thanks. Laurent Luce 回答1: You can't. Many browsers won't ever send the whole path, as a security measure to prevent information leakage. What's more you know nothing about the file and path naming conventions in force

Upload a file in a separate thread in a java webapp

萝らか妹 提交于 2019-12-13 02:04:45
问题 I need to make a form where users can upload big files (>200Mo). I wanted to launch the uploads in separate threads so users can launch 3-4 uploads and then do something else. My problem is the generated .tmp file is deleted when i run the secondary thread. I use Struts2. What struts2 gives me: private String uploadContentType; private String uploadFileName; private File upload; I transfer those information to my thread using its constructor MyThread thread=new MyThread (sourceName,

Dropzone.js - $_FILES is empty

两盒软妹~` 提交于 2019-12-13 01:45:11
问题 i have following Code: <form id="dvw-psa-enter-form" method="post" action="<?php echo site_url() . '/?upload' ?>" enctype="multipart/form-data"> <div class="dropzone"> <div class="fallback"> <input name="file" type="file" multiple /> </div> </div> <input type="submit" name="senden" /> </form> <script src="<?php echo plugins_url() . '/dvelop-workflow-psa/dropzone.js' ?>"></script> <script> jQuery(".dropzone").dropzone({ url: "<?php echo plugins_url() . '/upload' ?>", dictDefaultMessage: "Datei

Direct Upload to Cloudinary from Browser Bad Request

蹲街弑〆低调 提交于 2019-12-13 01:19:51
问题 i'm getting a 400 bad request error when trying to upload to cloudinary with the following code: $("input.cloudinary-fileupload[type=file]").cloudinary_fileupload(); $.cloudinary.config({"api_key":"6586856745648955","cloud_name":"some-cloud"}); $http.get("http://localhost:3000/story/secret") .then(function(res){ var CLOUD_API_SECRET = res.data.CLOUD_API_SECRET; var obj = { "timestamp": Date.now(), "callback": "http://localhost:3000/cloudinary_cors", "signature": CLOUD_API_SECRET, "api_key":

non flash multi file upload for php

丶灬走出姿态 提交于 2019-12-13 00:34:38
问题 looking into multi file - drag and drop - upload scripts. we were using swfupload until flash 10 destroyed it. the other options we are investigating are java and google gears. what would you recommend and do you know of libraries/examples/frameworks that support these options like the swfupload. thanks, Josh 回答1: I came across the same problem. The latest version of SWFUpload does work, and it does so by transparently overlaying the swf on top of your 'select files' button. This will work.

Tomcat java.lang.OutOfMemoryError: Java heap space

北城以北 提交于 2019-12-12 23:49:49
问题 In my Spring Boot application I want to upload files into a MySql database. When I want to upload large files, I get java.lang.OutOfMemoryError: Java heap space exception. I get it with files about over 60Mb which seems normal because as I know 64Mb is the default heap size. I've run Tomcat8w.exe and on the Java tab I've added the following lines to the Java Options: -Xms512m -Xmx8192m -XX:PermSize=512m -XX:MaxPermSize=1024m Also, I've created a setenv.bat file into the bin folder with the

TYPO3 upload multiple files in a frontend form

做~自己de王妃 提交于 2019-12-12 21:12:49
问题 I'm using the https://github.com/helhum/upload_example to create a form that allow file upload in frontend. It works fine with single file but I would need to upload multiple files. So here is my form field : <mr:form.upload property="files" id="publication-files-{contentUid}" class="file" data="{loading-text: '{f:translate(key: \'uploading\', extensionName: extKey)}', max-file-size: maxFileSize}" additionalAttributes="{autocomplete: 'off', accept: settings.allowedFiles, multiple: 'multiple'}

jQuery File Upload - Multiple File Upload Widgets on the same page

做~自己de王妃 提交于 2019-12-12 19:22:00
问题 I have the same problem...all thing works fine but during upload but images preview not displaying. I have looked the wiki page and I found a part of the problem. https://github.com/blueimp/jQuery-File-Upload/wiki/Multiple-File-Upload-Widgets-on-the-same-page When the page load, the first request (http://localhost/uploads_icon/server/php/) is not realized when I change the id form (id="fileupload") for a class as it's shown in the wiki. $(document).ready(function () { $('.fileupload').each

Prestashop uploading file while sending message

天涯浪子 提交于 2019-12-12 18:09:44
问题 I am trying to add function to attach file in order details page. There is an message sending form and i am trying to implement file upload in there. I have added this to order-detail.tpl <div class="form-group"> <input type="file" name="fileUpload" id="msgfile" class="inputfile" /> <label for="msgfile"><i class="icon-cloud-upload"></i> {l s='Prisegti failą'}</label> <p id="nbchars"></p> </div> and values to OrderDetailController.php if (Tools::isSubmit('submitMessage')) { $extension = array(