We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Uploading files via ejUploadbox without ashx-handlers

Hi!

Is there a way to use the ejUploadbox if you cannot use the ashx web handlers on the server? Maybe using Javascript instead?

Best regards,
Thong

3 Replies

HP Harikrishnan P Syncfusion Team February 26, 2015 10:38 AM UTC

Hi Thong,

Thanks for using Syncfusion products.

Query: Is there a way to use the ejUploadbox if you cannot use the ashx web handlers on the server? Maybe using Javascript instead?

We would like to inform you that, it is not necessary to use web handler file (ashx) to save the files in server. Also it is not possible to save the files to server using client side script (JavaScript) alone. We need to use any server side code (like PHP, C# etc..) with ejUploadbox, to save the files in server. For your reference we have prepared a sample to showcase how to save the files in server using PHP. Please check with the sample in the following location.

Sample Location : EJUpload box Sample

The above sample can be run in any PHP compatible server (like XAMPP). The uploaded files will be saved into the directory ‘uploads’.

Please get back to us if you would require any further assistance.

Regards,

HariKrishnan




TT Thong Ta February 26, 2015 10:51 AM UTC

Hi Harikrishnan,

Thanks for your reply. So when I understand correctly I need some server side code to handle my request. Can I use REST calls, too?

Best regards,
Thong Ta


HP Harikrishnan P Syncfusion Team February 27, 2015 01:01 PM UTC

Hi Thong,

Thanks for your update.

Query: So when I understand correctly I need some server side code to handle my request. Can I use REST calls, too?

Yes, we need to use server side code to handle the file upload to server. We can also use REST web services for handling file upload process. We have prepared a simple sample to showcase this. Please check with the sample in the following location.

REST service

EJ Upload Sample

We have created a REST web service and a console application to host the service. Run the service first, you can see that the host is opened. Now run the EJ upload sample, in which we have used HTTPWebRequest and HTTPWebResponse to read and write the files to the server or specified location. When a file is uploaded you can see that the files are saved in the location ‘FileUpload’ in D: drive.

Note: You need to create a directory as ‘FileUpload’ in D: drive

Please let us know if you have further queries.

Regards,

HariKrishnan



Loader.
Live Chat Icon For mobile
Up arrow icon