Seafile Pro Server Notification on folder upload to share link

Server 9.0.5 Pro

When uploading a folder via the Share link, no notifications are generated. Although, single file uploads are generated.

bump… for anyone out there…

The issue that I can see is that the API calls get_file_id_by_path after uploading either a file or a folder. The problem with that is - if the uploaded action was a file only, it will be okay as the function will return the id of the uploaded file. When uploading a folder on the other hand, the function will be called using the folder path… i.e.

file_path: /Upload/JoeMomma

resulting in the error:

{"error_msg":"File /Upload/JoeMomma not found."}

I think the solution would be either checking if the file_path is a folder first and validating that way or looping the function for each file uploaded.
The function in question is:
Line 337 is where the function is called.

See answer for correct file…

I went ahead and dove in further - I ended up fixing the issue by editing this file:

I ended up removing lines 969-972 and replacing with this:

file_id = seafile_api.get_file_id_by_path(repo_id, file_path)
dir_id = seafile_api.get_dir_id_by_path(repo_id, file_path)
if not file_id and not dir_id:
	error_msg = 'File/Folder %s not found.' % file_path
	return api_error(status.HTTP_404_NOT_FOUND, error_msg)

And now notifications for folder uploads are now coming through.