Is it possible to upload an image and rename it only with Java Script?

Asked

Viewed 72 times

2

Have some way to grab the image file of the request, save it in some directory and change the name of the server using JavaScript?

Obs: It can be either way, or use any framework (AngularJS, jQuery)

  • Javascript is used in the client, that is, in your browser only, you need a server code to do this. You can even use Javascript if you write a server code using Nodejs.

  • @Ricardopunctual has no problem, can be saved on the customer’s side even

  • For security reasons Javascript no commands allowed to access the disk in the client’s browser.

2 answers

1


I’ve been doing some research, and actually just using JavaScript it is impossible to upload files, for security reasons it is only possible to upload files on the client side, ie we cannot rename, move or something like (Manipulate).

Unless we use it Nodejs to create a API with JavaScript.

0

No, for security reasons you have no control to handle client-side files, you can rename after it gets on the server side.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.