File upload related questions

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

File upload related questions

#1

Postby t4nu » Tue Feb 16, 2016 9:34 am

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.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Tue Feb 16, 2016 10:19 am

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

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

#3

Postby t4nu » Wed Feb 17, 2016 5:40 am

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.
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

User avatar
Wai
Moderator
Moderator
Posts: 165
Joined: Wed Sep 12, 2007 9:04 am
Location: Sandy, UK
Contact:

#4

Postby Wai » Wed Feb 17, 2016 9:23 am

I've done this using

Code: Select all

FileServices.moveFile(system.variables.$FILE_NAME.value, fields.FILE_PATH.value);
This does work. When you say it won't work, do you get an error?
0 x

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

#5

Postby t4nu » Wed Feb 17, 2016 9:48 pm

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
Wai wrote:I've done this using

Code: Select all

FileServices.moveFile(system.variables.$FILE_NAME.value, fields.FILE_PATH.value);
This does work. When you say it won't work, do you get an error?
0 x


Who is online

Users browsing this forum: Majestic-12 [Bot] and 7 guests