You are viewing limited content. For full access, please sign in.

Question

Question

How can I rename a file using forms

asked on September 29, 2015

Hi all!

 

We are trying to rename a file inside the server (in a physic path), the problem is that jquery doesn't allow us to do it and even if we try to use customized html in order to use PHP, sadly Forms somehow blocks it. Also we cannot use WF for this.

 

So, have any of you tried this? Is there a way for us to use php? Any suggestion will be appreciated. 

 

Thanks 

0 0

Answer

SELECTED ANSWER
replied on September 29, 2015

jQuery runs in the browser and doesn't have access to files on the client machine, let alone the server machine.  Forms is an ASP.Net application and it's not set up for you to just write your own code and add it to the project.  If you want to write PHP you can do that (presuming you have a PHP runtime installed on the server), but you'll need to figure out how to hook this in to the rest of Forms.  Also, having a publicly accessible page that allows anyone to rename files has the potential to be a serious security risk.

That said, why do you want to rename a file on disk?  If it's part of a Forms process the actual name of the file is unimportant since the metadata is stored elsewhere.

2 0

Replies

replied on September 29, 2015

Hi Brian, 

Thanks for your answer, I've being thinking about the security point and you are right, I'm going to try it with a c# solution so everything is going to be done on the server side. 

I need to change the file's name because I need to be sure that two processes are not going to modify it at the same time.

But I'm open to other suggestions so I can find the best approach. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.