|
350 | 350 | </cfif> |
351 | 351 | |
352 | 352 | <!--- Copy the source into the new field ---> |
353 | | - <cfif len(sourcefilename) and refindnocase("//res.cloudinary.com/",sourcefilename)> |
| 353 | + <cfif len(sourcefilename) and (application.fapi.getConfig("cloudinary", "uploadVia", "post") neq "post" or refindnocase("//res.cloudinary.com/",sourcefilename))> |
| 354 | + <!--- source=xxx => original file for this image; _source=xxx => temporary variable used for dependant cuts ---> |
| 355 | + <cfset sourcefilename = replace(sourcefilename,"?source=","?_source=") /> |
| 356 | + <cfelseif len(sourcefilename) and refindnocase("//res.cloudinary.com/",sourcefilename)> |
354 | 357 | <!--- source=xxx => original file for this image; _source=xxx => temporary variable used for dependant cuts ---> |
355 | 358 | <cfset sourcefilename = replace(sourcefilename,"?source=","?_source=") /> |
356 | 359 | <cfelseif len(sourcefilename) and application.fc.lib.cdn.ioFileExists(location="images",file=sourcefilename)> |
|
389 | 392 | |
390 | 393 | <cfsetting requesttimeout="120" /> |
391 | 394 | |
392 | | - <cfif len(arguments.source) and not refindnocase("//res.cloudinary.com/",arguments.source)> |
| 395 | + <cfif len(arguments.source) and application.fapi.getConfig("cloudinary", "uploadVia", "post") eq "post" and not refindnocase("//res.cloudinary.com/",arguments.source)> |
393 | 396 | <cfreturn super.GenerateImage(argumentCollection=arguments) /> |
394 | 397 | </cfif> |
395 | 398 | |
|
418 | 421 | <cfreturn application.fc.lib.cloudinary.upload(file=arguments.file, publicID=arguments.publicID, transformation=arguments.transformation).urlWithSource /> |
419 | 422 | </cfcase> |
420 | 423 | <cfcase value="fetch"> |
421 | | - <cfreturn application.fc.lib.cloudinary.fetch(file=arguments.file) /> |
| 424 | + <cfreturn application.fc.lib.cloudinary.fetch(file=arguments.file, cropParams={}) /> |
422 | 425 | </cfcase> |
423 | 426 | <cfcase value="auto"> |
424 | 427 | <cfreturn application.fc.lib.cloudinary.autoUpload(file=arguments.file) /> |
|
0 commit comments