i never worked with ubuntu before so i am trying t...
# cfml-beginners
g
i never worked with ubuntu before so i am trying to create a function which writes pdf files to the folder, i am getting permissions error but i am not sure if it is the right way of doing it here is my code application.imagesPath = "/projects/files/images/openimages/";
Copy code
public any function writepdf(required pdfFile="") {
		var sourcefile="#arguments.pdffile#";
		var n = 'a.pdf';
		var dir = application.imagesPath & n;
		cfpdf(action="write",source="#sourcefile#",destination="#dir#",overwrite="yes");
		return n;
	}
i am getting Permission denied error
a
/projects/files/images/openimages/
seems unlikely as a dir on Ubuntu. It's expecting a fully qualified file system path yeah? So like
/var/tmp/whatevs
. Is
projects
a CF mapping, and are you hoping CF will expand it out? Do you know that works? Or is
projects
a subdir of your webroot?
g
its a sub directory
a
right, so like I said... It's expecting a fully qualified file system path. The whole path.
so - I'm guessing -
/var/www/projects/files/images/openimages/
g
ok, let me see if that works
connecting to ftp, i am also going to check if getTemplatefrompath will get me something or not
j
You can also
expandPath('/projects/files/images/openimages')
g
As Adam said I was able to do it with fully qualified url