emptying a folder and creating a folder/file
Aug 07, 2015
By
Andrew Lian
Hello everyone
Is there a simple way to use articulate to create a folder on a pc? I assume JS will do it.
Is there a simple way to empty the contents of a folder on a pc? I assume JS will do it.
Is the a simple way to upload files to a server? I guess JS will do it too but php may be better as it would be more secure. I would like the upload to be automatic for a predefined filename (rather than the student browsing, selecting and uploading through a form).
Would there be some safe code that is routinely used by articulate users?
Thanks a lot
Andrew
7 Replies
Hi Andrew,
I'm not clear on how you are looking to use Articulate to create a folder on your PC - or empty the contents. When you publish any using any of the Storyline publish methods, those will generate the appropriate folders and hierarchy based on the publish method. Perhaps you could share a bit more information about what you're looking to do so that the community can weigh in?
Thanks Ashley
I am thinking of recording students' interactions with a lesson by creating triggers for buttons. These triggers will send a specific code to a file depending on the button pressed. Once the interaction is complete, I would like to use JS or an alternative language to send the entire file to an online server.
Cheers
Andrew
Javascript will not let you delete files on a users machine as javascript is sandboxed, I expect you could use a server side script to achieve this. You can probably create a folder but only in IE using javascript alone, the Storyline Javascript best practices have instructions on how to save a file to the users machines. You will however find that security policies will prevent this working on a lot of machines.
I would steer away from doing this myself, I don't think we should be creating and deleting files on a users machine, not to mention what might happen if you get it wrong and delete something by mistake.
Yup - I'll defer to the community on this one Andrew, but I'd agree with Phil - deleting files off a users system sounds potentially dangerous.
Thanks to both of you. Of course I understand, but I would like to record which buttons are pressed etc... and ultimately upload a file to a server. So I need to store these button presses temporarily in a file (or somewhere) which then gets uploaded somehow. As the PC is used by multiple people, the simplest thing, I thought, would be to empty a specific folder and then (even manually) browse and upload the file with information. If the user HAS to see what they are uploading then seeing only one file, their own file, would reduce confusion.
Maybe it is just not doable in a simple way. I am sure it can be done in a complicated manner :(
Cheers
Andrew
Thanks Matt for sharing those here.
Thank you Matt - just saw this (after Ashley responded).
Best wishes
Andrew
This discussion is closed. You can start a new discussion or contact Articulate Support.