upload file into a specific folder
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2012 04:48 AM
Hi, im new to Alfresco and im just going through the different webscript examples. The one im looking right now is a form to upload a file into alfresco root home setting the title and description. It works 100% ….
The prob comes when i try to upload the file to a different folder. This is what ive been trying:
Since i havent found any example around im not even sure this is the correct way to proceed, so any help will be nice :idea:
Thanks in Advance.
The prob comes when i try to upload the file to a different folder. This is what ive been trying:
var folder = roothome.childByNamePath("Sites/my new folder"); upload = folder.createFile(filename) ;
Since i havent found any example around im not even sure this is the correct way to proceed, so any help will be nice :idea:
Thanks in Advance.
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2012 05:02 AM
Hi,
here http://wiki.alfresco.com/wiki/4.0_JavaScript_API#ScriptNode_API you can find more info about ScriptNode API
Some examples here http://wiki.alfresco.com/wiki/Web_Scripts_Examples
General info about WebScripts anatomy here https://wiki.alfresco.com/wiki/Web_Scripts
Regards,
Andrea
here http://wiki.alfresco.com/wiki/4.0_JavaScript_API#ScriptNode_API you can find more info about ScriptNode API
Some examples here http://wiki.alfresco.com/wiki/Web_Scripts_Examples
General info about WebScripts anatomy here https://wiki.alfresco.com/wiki/Web_Scripts
Regards,
Andrea
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2012 05:45 AM
worked for me, after a bit of reading 🙂
Thanks for the help.
var folder = companyhome.childByNamePath("Sites/subfolder1/subforder2"); upload = folder.createFile(filename) ; upload.save();
Thanks for the help.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2014 02:49 PM
I have tried this and it fails… v. 4.2e.
Can you provide more details?
The logic seems to work…
Have there been changes in CE 4.2e?
Can you provide more details?
The logic seems to work…
Have there been changes in CE 4.2e?
