• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

No longer able to upload via FTP

Community Beginner ,
Jan 23, 2018 Jan 23, 2018

Copy link to clipboard

Copied

For many years I have been able to upload photos directly from Lightroom to my website using the Export feature. But the plugin appears to have failed.

I get the following errors when I attempt to export:

Plug-in error log for plug-in at: /Users/xxxx/Pictures/Lightroom/plugins/ftp_upload.lrdevplugin

**** Error 1

This plug-in’s post-processing task did not finish successfully.

Unable to upload because Lightroom cannot ascertain if the target destination exists.

**** Error 2

This plug-in’s post-processing task did not finish successfully.

The specified FTP preset is incomplete and cannot be used.

**** Error 3

This plug-in’s post-processing task did not finish successfully.

The specified FTP preset is incomplete and cannot be used.

I am very anxious to find a solution to this and would appreciate any assistance.

Thank you.

TOPICS
SDK

Views

4.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 23, 2018 Jan 23, 2018

Copy link to clipboard

Copied

Hi RouviereMedia,

Please refer the below discussions related to this issue and try the offered suggestions.

https://www.lightroomforums.net/threads/export-or-publish-to-ftp-server.15254/

Lightroom: SFTP error: "Cannot upload because Lightroom could not create the destination directory" ...

Regards,

Mohit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 24, 2018 Jan 24, 2018

Copy link to clipboard

Copied

Hi Mohit,

Unfortunately neither one of those links provide an answer. The first reference is from 2012. I have been able to use the FTP export for the last 5-7 years without any problem. It is only this week that the problem has arisen.

The second reference, while more recent also does not have any reference to my problem. Their problem was a permissions issue on the server.

In my case there appears to be a problem with the plugin failing.

I am open to additional ideas.

Thanks.

Forrest

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 24, 2018 Jan 24, 2018

Copy link to clipboard

Copied

Hi RouviereMedia,

I really apologize that my previous response did not help you. Are you facing this issue after any specific update?

Regards,

Mohit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 24, 2018 Jan 24, 2018

Copy link to clipboard

Copied

Hi Mohit,

The last time I uploaded via FTP in LightRoom was Sept 25. I am currently running LR V7.1 which is the current version, so I believe there was at least one update since the last time I uploaded.

Thank you for your assistance.

Forrest

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 07, 2018 Feb 07, 2018

Copy link to clipboard

Copied

Hi Forrest,

I really apologize for my ignorance on this discussion. I would like to get some more insight on your issue.

Do you have any firewall/antivirus software running on the system? Are you able to upload outside of Lightroom? Also, could you provide any screenshots of your FTP plugin settings?

You may take a look at this link which talks about "How to send file - FTP Your photos directly from Lightroom Classic and cross check all the settings: https://photofocus.com/2017/11/25/how-to-send-piles-of-files-ftp-your-photos-directly-from-lightroom...

Also, I have a user guide for Lightroom Classic SDK: https://d1g4ig3mxc5xed.cloudfront.net/static/installers/lr/sdk/cc_2018/doc/lightroom-classic-sdk-gui... (Refer Pages 153 - 157)

Regards,

Mohit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2018 Feb 13, 2018

Copy link to clipboard

Copied

Hi Mohit,

I finally gave up on this process. I now export the photos to a local folder and upload manual using my FTP client.

I am not sure if there is much commitment from Adobe on this feature.

Thank you.

Forrest

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 18, 2018 Jun 18, 2018

Copy link to clipboard

Copied

I, too, would love to be able to upload my files directly to my FTP. Could you look into adding the feature again? Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 01, 2018 Oct 01, 2018

Copy link to clipboard

Copied

Removing the ftp upload tool seems such a backward step. I figure it's designed to make us use Adobe's cloud?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 13, 2018 Oct 13, 2018

Copy link to clipboard

Copied

I agree rugfoot. This is a HUGE step backwards. I'm having the same issue.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 09, 2018 Nov 09, 2018

Copy link to clipboard

Copied

I had FTP setup very nicely to upload to stock image sites directly from Lightroom. Now that doesn't even show up in my Publish options. I upgraded the SDK FTP upload. The plugin is enabled but you can't add it as a Publish entity. If this isn't a bug then why include it in the latest SDK?

So IMO this is a bug and should be fixed ASAP so that we can get back to using this as intended.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 09, 2018 Nov 09, 2018

Copy link to clipboard

Copied

So IMO this is a bug and should be fixed ASAP so that we can get back to using this as intended.

Adobe wants all product feedback posted in the official feedback forum: Lightroom Classic CC | Photoshop Family Customer Community . Product developers don't participate in this forum (the SDK forum) and won't see anything you post here.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 09, 2019 Oct 09, 2019

Copy link to clipboard

Copied

LATEST

This is a workaround for the Lightroom 6, Mac, error message "Cannot upload because Lightroom could not create the destination directory." when using the FTP Plugin. It may apply partially to your question and certainly to those of others here.

 

You can edit the a plugin file in TextEdit to the extend that the faulty function is being disabled. The hack disables all sorts of verifications, though. I made it work that way. Because I know for sure that the target directory does exist, I do not need any target directory check by the plugin. You do this on your own risk. Here is what I did on a Mac:

 

1. Go to /Applications/LR6/ftp_upload.lrdevplugin

Note: "LR6" stands for the folder name where your local Lightroom Application resides on your Mac. So you replace "LR6" with the name of that folder.

2. Open FtpUploadTask.lua in TextEdit (or any other text editor)

3. comment (mask) the directory check routine by adding "--" at the beginning of each line, starting at "if exists == false then", down to, including, "end" of that verification routine. In order for you to find the right routine in the code, I have attached the entire code below. Instead of commenting the directory verification check routine, may be able to actually erase this portion entirely, too. I commented it because I wasn´t sure if it might be needed in other instances - so that It can then be uncommented:

 -- if exists == false then
		--	local success = ftpInstance:makeDirectory( '' )
			
		--	if not success then
			
				-- This is a possible situation if permissions don't allow us to create directories.
				
		--		LrErrors.throwUserError( LOC "$$$/FtpUpload/Upload/Errors/CannotMakeDirectoryForUpload=Cannot upload because Lightroom could not create the destination directory." )
		--	end
			
		--elseif exists == 'file' then
		
			-- Unlikely, due to the ambiguous way paths for directories get tossed around.
			
		--	LrErrors.throwUserError( LOC "$$$/FtpUpload/Upload/Errors/UploadDestinationIsAFile=Cannot upload to a destination that already exists as a file." )
		-- elseif exists == 'directory' then
		
			-- Excellent, it exists, do nothing here.
			
		--else
		
			-- Not sure if this would every really happen.
			
		--	LrErrors.throwUserError( LOC "$$$/FtpUpload/Upload/Errors/CannotCheckForDestination=Unable to upload because Lightroom cannot ascertain if the target destination exists." )
		-- end

The entire file FtpUploadTask.lua now looks like this:

--[[----------------------------------------------------------------------------

FtpUploadTask.lua
Upload photos via Ftp

--------------------------------------------------------------------------------

ADOBE SYSTEMS INCORPORATED
 Copyright 2007 Adobe Systems Incorporated
 All Rights Reserved.

NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
with the terms of the Adobe license agreement accompanying it. If you have received
this file from a source other than Adobe, then your use, modification, or distribution
of it requires the prior written permission of Adobe.

------------------------------------------------------------------------------]]

-- Lightroom API
local LrPathUtils = import 'LrPathUtils'
local LrFtp = import 'LrFtp'
local LrFileUtils = import 'LrFileUtils'
local LrErrors = import 'LrErrors'
local LrDialogs = import 'LrDialogs'

--============================================================================--

FtpUploadTask = {}

--------------------------------------------------------------------------------

function FtpUploadTask.processRenderedPhotos( functionContext, exportContext )

	-- Make a local reference to the export parameters.
	
	local exportSession = exportContext.exportSession
	local exportParams = exportContext.propertyTable
	local ftpPreset = exportParams.ftpPreset
	
	-- Set progress title.

	local nPhotos = exportSession:countRenditions()

	local progressScope = exportContext:configureProgress {
						title = nPhotos > 1
							   and LOC( "$$$/FtpUpload/Upload/Progress=Uploading ^1 photos via Ftp", nPhotos )
							   or LOC "$$$/FtpUpload/Upload/Progress/One=Uploading one photo via Ftp",
					}

	-- Create an FTP connection.
	
	if not LrFtp.queryForPasswordIfNeeded( ftpPreset ) then
		return
	end
	
	local ftpInstance = LrFtp.create( ftpPreset, true )
	
	if not ftpInstance then
	
		-- This really shouldn't ever happen.
		
		LrErrors.throwUserError( LOC "$$$/FtpUpload/Upload/Errors/InvalidFtpParameters=The specified FTP preset is incomplete and cannot be used." )
	end
	
	-- Ensure target directory exists.
	
	local index = 0
	while true do
		
		local subPath = string.sub( exportParams.fullPath, 0, index )
		ftpInstance.path = subPath
		
		local exists = ftpInstance:exists( '' )
		
		 -- if exists == false then
		--	local success = ftpInstance:makeDirectory( '' )
			
		--	if not success then
			
				-- This is a possible situation if permissions don't allow us to create directories.
				
		--		LrErrors.throwUserError( LOC "$$$/FtpUpload/Upload/Errors/CannotMakeDirectoryForUpload=Cannot upload because Lightroom could not create the destination directory." )
		--	end
			
		--elseif exists == 'file' then
		
			-- Unlikely, due to the ambiguous way paths for directories get tossed around.
			
		--	LrErrors.throwUserError( LOC "$$$/FtpUpload/Upload/Errors/UploadDestinationIsAFile=Cannot upload to a destination that already exists as a file." )
		-- elseif exists == 'directory' then
		
			-- Excellent, it exists, do nothing here.
			
		--else
		
			-- Not sure if this would every really happen.
			
		--	LrErrors.throwUserError( LOC "$$$/FtpUpload/Upload/Errors/CannotCheckForDestination=Unable to upload because Lightroom cannot ascertain if the target destination exists." )
		--end
		
		if index == nil then
			break
		end
		
		index = string.find( exportParams.fullPath, "/", index + 1 )
		
	end

	ftpInstance.path = exportParams.fullPath
	
	-- Iterate through photo renditions.
	
	local failures = {}

	for _, rendition in exportContext:renditions{ stopIfCanceled = true } do
	
		-- Wait for next photo to render.

		local success, pathOrMessage = rendition:waitForRender()
		
		-- Check for cancellation again after photo has been rendered.
		
		if progressScope:isCanceled() then break end
		
		if success then

			local filename = LrPathUtils.leafName( pathOrMessage )
			
			local success = ftpInstance:putFile( pathOrMessage, filename )
			
			if not success then
			
				-- If we can't upload that file, log it.  For example, maybe user has exceeded disk
				-- quota, or the file already exists and we don't have permission to overwrite, or
				-- we don't have permission to write to that directory, etc....
				
				table.insert( failures, filename )
			end
					
			-- When done with photo, delete temp file. There is a cleanup step that happens later,
			-- but this will help manage space in the event of a large upload.
			
			LrFileUtils.delete( pathOrMessage )
					
		end
		
	end

	ftpInstance:disconnect()
	
	if #failures > 0 then
		local message
		if #failures == 1 then
			message = LOC "$$$/FtpUpload/Upload/Errors/OneFileFailed=1 file failed to upload correctly."
		else
			message = LOC ( "$$$/FtpUpload/Upload/Errors/SomeFileFailed=^1 files failed to upload correctly.", #failures )
		end
		LrDialogs.message( message, table.concat( failures, "\n" ) )
	end
	
end

- Reload the PlugIn in the Lightroom PlugIn Manager or restart Lightroom

- Try again - in my case ftp suddenly worked again, I was able to upload image to a given folder on a SFTP Server.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines