Posts

Showing posts with the label Upload image

Upload Image using Node js

Server.js  var multer = require( 'multer' ); app. post ( '/api/photo' , function ( req , res ) {          try { imagedata(req, res, function ( err ) {          if (err) { var  response = { "success" : "0" , data : { "msg" : "Error uploading file." } } res. end (response); }                else  {                          console. log ( "File Upload Successfully" );                             var  response = { "success" :  "1" ,  data : { "msg" :  "file Upload Success fully" } } res. end (response);                     }          });        }catch ( err ) { var  response = { "success" : "0" ,  data : { "msg" : "Error Handle in Catch" + err } } res. json (response); } }) var imagedata = multer({ storage :

Upload Multiple File in Php using Javascript

Result.php  <form>                 <div class = " form-group Row " >                     <label for = " ReportResult " class = " col-sm-2 form-control-label " > Report Result File: </ label >                     <div class = "col-sm-6" >                         <input type = "file" class = "form-control-file" name = "reportfile[]" id = "reportfile"     accept = "image/*,application/pdf" multiple >                     </div>                 </div>                 <div class = "form-group Row" >                     <label for = "remark" class= "col-sm-2 form-control-label" > Remark: </label>                     <div class = "col-sm-6" >                         <textarea class = "form-control" id="remark" ></textarea>        

Insert Data using Uploading Excel file and upload image and set water mark

Image
Demo.aspx < body >     < form id ="form1" runat ="server">     < div >     < table >     < tr >     < td >< asp : FileUpload ID ="fu" runat ="server" /></ td >     < td >< asp : Button ID ="btnupload" runat ="server" Text ="Upload File"             onclick ="btnupload_Click" /></ td >     </ tr >     </ table >     </ div >     </ form > </ body > Demo.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; using System.Data; using System.Data.OleDb; using System.Drawing; using System.Drawing.Drawing2D; using System.Text; using System.Drawing.Imaging; public partial class excellupload : System.W