Hi,
After tried to upload file, I got questions:
1. Is the upload form can be modified?
2. Is there an easy way to change the name of the file uploaded?
What currently I do is copy to a new file and then delete the old one.
Thanks in advance for the help.
File upload related questions
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
1. See http://forum.ebasetech.com/forum/viewtopic.php?t=854
2. You can rename a file with FileServices.moveFile()
See http://dev-docs.verj.io/ufs/doc/working_with_files.htm for more details.
2. You can rename a file with FileServices.moveFile()
See http://dev-docs.verj.io/ufs/doc/working_with_files.htm for more details.
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
Seems that the FileServices.movefile() need the full path of the file in order to work properly.
I have tried to rename using the value from system.variables.$FILE_NAME.value, it won't work.
I have tried to rename using the value from system.variables.$FILE_NAME.value, it won't work.
Jon wrote:1. See http://forum.ebasetech.com/forum/viewtopic.php?t=854
2. You can rename a file with FileServices.moveFile()
See http://dev-docs.verj.io/ufs/doc/working_with_files.htm for more details.
0 x
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
I've done this using
This does work. When you say it won't work, do you get an error?
Code: Select all
FileServices.moveFile(system.variables.$FILE_NAME.value, fields.FILE_PATH.value);
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
No, it didn't show any error, just the file was not moved to the folder I want it to.
Will try it again today.
Thanks
Will try it again today.
Thanks
Wai wrote:I've done this using
This does work. When you say it won't work, do you get an error?Code: Select all
FileServices.moveFile(system.variables.$FILE_NAME.value, fields.FILE_PATH.value);
0 x
Who is online
Users browsing this forum: No registered users and 5 guests