tracker issue : CF-3862308

select a category, or use search below
(searches all categories and all time range)
Title:

Recursive creation of directory for S3 is not working.

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/ThirdParty

Reporter/Name(from Bugbase): / ext-user (Suchika Singh)

Created: 12/04/2014

Components: File Management, VFS-S3

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: 292480 /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win XP All

Vote Count: 1

Problem:Recursive creation of directory  for S3 is not working.

Method:Run the attached code

Result:Directory not created

Expected:Recursively directory should be created

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3862308

External Customer Info:
External Company:  
External Customer Name:  
External Customer Email:

Attachments:

Comments:

cfdirectory is used for creating/deleting bucket and should not be used for creating directories inside a bucket. check the documentation https://wikidocs.adobe.com/wiki/display/coldfusionen/Optimizing+ColdFusion+applications But creating a file like this <cfset mydir1 = "s3://pavansample"> <cfset filewrite("#mydir1#/docs/test/test.txt","us hiuahsiu sdnfiahfoinifhs oifushdifuwewheiuwhfiuhfhfkjhdkfjdshkfjshdfkjshkjfsdhkfjdshkj")> creates the nested directories
Comment by S V.
9723 | December 04, 2014 12:42:34 PM GMT
Is this a limitation from S3 side ? Because using cfdirectory we can create recursive directories.
Comment by Suchika S.
9724 | December 05, 2014 12:47:04 AM GMT
Yes its already documented.
Comment by S V.
9725 | December 05, 2014 12:51:55 AM GMT
It's actually a limitation from the CF side. The S3 Management Console fully supports: 1) 'folder' creation (directoryList() returns type="Dir") 2) 'folder' deletion (recursively deletes all child 'folders' and files) Thus, directoryCreate() should be able to recursively create directories. And directoryDelete() should also recursively delete the contents of a directory. Currently, directoryDelete() deletes the 'folder', but does not recursively delete the child 'folders' and files w/in it. And directoryCreate() fails to create any S3 'folder' other than bucket. I'm unable to view the attached code, but suffice it to say that the CF documentation outlines the -actual- behavior but not the -expected- behavior of a full S3 implementation. Thanks!, -Aaron
Comment by External U.
9726 | December 27, 2014 12:56:16 AM GMT
+1 - should be fixed as this is a CF limitation, not an S3 limitation
Vote by External U.
9727 | December 27, 2014 12:57:23 AM GMT