upload

Finish uploading files and then execute the jsf:action of the button

只愿长相守 提交于 2019-12-12 04:45:13
问题 The fileupload, as seen in the code, call a method, which saves files in a List <>. The upload files from the button with the ruling PF ('fileupload') upload ().; What I need here is that when you upload the "n" preloaded, recently at the end of the upload, execute the action method of the button. <p:fileUpload id="fileupload" widgetVar="fileupload" fileUploadListener="#{incidentBean.handleAttachment}" mode="advanced" label="Adjuntar (máx. 800kb)" invalidFileMessage="Archivo inválido" update=

Rails 3: Errno::ENOENT exception

懵懂的女人 提交于 2019-12-12 04:42:35
问题 I have the code as following. It runs OK on my local machine `params[:file].each do |f| tmp = f.tempfile ext = File.extname(f.original_filename) basic_file_name = "#{session[:user]["id"]}_#{Time.new.to_i}#{ext}".downcase file = File.join(TEMPORARY_FILE_FOLDER, basic_file_name) FileUtils.cp tmp.path, file` But on my remote server which is a CentOS server, it gives me this `Errno::ENOENT in CustomController#process_custom_order No such file or directory - public/uploaded/709_1388758536.jpg`

Codeigniter + Redactor (wysiwyg js editor). Image uploading

☆樱花仙子☆ 提交于 2019-12-12 04:35:13
问题 I trying to integrate wysiwyg editor Redactor in Codeigniter website. RedactorOptions: { lang: lang(), toolbarFixed: true, buttons: ['html', '|', 'bold', 'italic', 'deleted', '|', 'image', 'video', '|', 'unorderedlist', 'orderedlist', '|', 'alignment', '|', 'horizontalrule', '|', 'table', '|', 'mtLink'], imageUpload: '/upload_photo' } while I start to send photo through Upload Image Dialog, I see in Developer console: Uncaught TypeError: Cannot read property '0' of null redactor.js:1 Redactor

php file upload capitalized filename issue

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 04:30:15
问题 I have a pretty standard file upload form (that is also writing to a mysql db). It was working fine throughout my testing, then I went and tested a file that was named with all capital letters. The file would not upload. Simple solution I figured, just rename the file before the upload with 'strtolower' but no luck. Also tried strtoupper, still no luck. I think I'm also running into this issue with files starting with numbers. (i did double check and yes the folder is writable.) $upload_dir =

Laravel 5: Uploaded image can't be displayed and file permission

时间秒杀一切 提交于 2019-12-12 04:24:05
问题 In my Laravel 5 project, I uploaded image to my sub folders of the public folder. Example: public/uploads/logos/imagename.jpg. The image is uploaded successfully but I have two problems: I can't display the image in the view using <img src="uploads/logos/imagename.jpg"> . The error says that file is not found. When using below code to delete the image, I got another problem of file permission: $path ="uploads/logos/imagename.jpg"; if(file_exists($path)) { unlink($path); } Please kindly advise

grails file uploads management in wars

限于喜欢 提交于 2019-12-12 04:23:04
问题 I have developed a grails app which has user file uploads (docs, etc..), they are stored in the relative folder "web-app/upload". My question is that I do not know what is the best way to perform automatically war deployments and keep this folder. Because when I redeploy in Tomcat the whole app folder is deleted and all the files are deleted. Additionaly I need a generic configuration fron set an external location from this Files Have you found a solution for that? P.D.: If I use System

HTTP Error 415 Unsupported media type

天大地大妈咪最大 提交于 2019-12-12 04:18:40
问题 I am still on the same problem as: Upload binary data with HTTP PUT with jersey jaxrs-ri-2.01 But I am one step further. Now I am testing my data upload with this tool: I'm Only Resting The problem, and I don't know if it's a client or a server problem is that when I'm testing, I get HTTP 415 - Unsupported Media Type In the client: I have checked the PUT method In the body I have put one blank line (return) and in the second line i wrote test In the server, It was working until I added this

Laravel: The file was not uploaded due to an unknown error

混江龙づ霸主 提交于 2019-12-12 04:17:37
问题 I am trying to upload a file to two different locations. The lcoations being /2x/ adn /3x/ . It uploads the file on 3x but doesn't on 2x and throws this error: The file was not uploaded due to an unknown error Here is what i am doing: $photo = $request->file('photo'); if (isset($photo)) { if ($photo != null || $photo != '') { $imageSize = getimagesize($photo); $resolution = $imageSize[0] . 'x' . $imageSize[1]; if ($resolution == '300x300' || $resolution == '450x450') { if (!file_exists(base

Angular upload 405 (Method Not Allowed)

允我心安 提交于 2019-12-12 04:17:34
问题 When try upload images with angular get error 405 (Method Not Allowed) Online example I'm change headers im my source but again error, any solution? When change URL to https://angular-file-upload-cors-srv.appspot.com/upload work fine on my destination not working! 回答1: Your destination needs to be Web API that handles POST. Something like that: using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web; using System.Web.Http;

Sending a class object with Stream property using Rest

杀马特。学长 韩版系。学妹 提交于 2019-12-12 03:57:09
问题 I can send a simple class object with some properties like this: [DataContract] public class DeviceInfo { [DataMember] public string DeviceCode { get; set; } [DataMember] public string ClientKey { get; set; } [DataMember] [XmlIgnore] public DateTime Timestamp { get; set; } [DataMember] public string Token { get; set; } } WindowsForm code: string baseAddress = "http://some_webservice_url"; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(baseAddress); request.Method = "POST"; request