Bulk Image Upload & special characters

FC 7.2.12, Lucee 5.2.9.31, Linux
If an image file name has any special characters it fails to be found because ioGetFileLocation will default to normalizePath removing any special characters for it’s lookup.

Could not handle /IMG_3558(1)-sm2.jpg: Expected file does not exist /srv/www/mysite/htdocs/WEB-INF/lucee/temp/IMG_35581-sm2.jpg

I’ve added bRetrieve=“true” to bulkupload.cfc to resolve this.

<cfset stResult = application.formtools[application.fapi.getPropertyMetadata(stObject.typename, arguments.details.targetfield, "ftType")].oFactory.handleFileLocal(
		typename = stObject.typename,
		objectid = stObject.objectid,
		existingFile = "",
		localFile = application.fc.lib.cdn.ioGetFileLocation(location="temp", file=arguments.details.tempfile,bRetrieve="true").path,
		destination = application.fapi.getPropertyMetadata(stObject.typename, arguments.details.targetfield, "ftDestination"),
		secure = application.fapi.getPropertyMetadata(stObject.typename, arguments.details.targetfield, "ftSecure", false),
		status = structKeyExists(stObject, "status") ? stObject.status : "approved",
		allowedExtensions = application.fapi.getPropertyMetadata(stObject.typename, arguments.details.targetfield, "ftAllowedExtensions"),
		sizeLimit = application.fapi.getPropertyMetadata(stObject.typename, arguments.details.targetfield, "ftSizeLimit", 0),
		bArchive = false
	) />

This issue has been around a while now.
If no one can see an issue I’ll create a pull request.

1 Like

Looks good to me Phil, happy to receive a pull request and merge it for you :smiley:

Merged :slight_smile: