Drag Files with url in the Devonthink pro to messenger app will drop url but not the file

I downloaded a file from internet and imported it to my Devonthink pro 3, it shows a file with a url. Here is the my question: When I dragged this file to send it through a messenger app, it dropped the url to the messenger instead of the file itself while the files without url do not. Anything I could do to drop the file but not the url of it? Many thanks!


image

1 Like

Which one?

Thanks buddy. Indeed, it seems it is the messenger itself. I tested another messenger app and it won’t drop as url.

And we still don’t know which messengers you’re talking about. The information might be beneficial for others stumbling upon this thread, don’t you think?

wechat

WeChat is the most opaque, buggy and resource-hogging social media client on this planet. It is lackluster in terms of features but consumes more RAM, CPU and storage than all competitors combined. It uses your device as the file server – the only way for you to access your account history is to have everything stored locally, photos and even videos included. QQ, the earlier social media project by Tencent, was found to scan entire hard drives without the user’s consent. Many suspect WeChat is doing the same, although censorship makes it hard to talk about concrete evidence.

Rant aside, the advice: don’t use WeChat for the sake of your own data privacy. Or at least, only ever use its File Helper in a web browser on your Mac, and do the rest of your work on a work phone.

3 Likes

This issue still persists even after two years. Coming back to this thread, I’m shocked by the arrogance and hostility in this community. Your response does absolutely nothing to help solve the problem—we are discussing ways to force providing files instead of URLs when dragging from DT to WeChat, yet you’re just telling people WeChat is trash and not to use it.

Yes, we’re all aware of WeChat’s shortcomings but for many adults using it is not even a choice. That being said, I think DT might lack the functionality to specify whether we want to drag the URL, extracted text, or the file itself when dragging into other apps, not limited to WeChat.

If someone raises concerns, they are neither arrogant nor hostile. There’s nothing wrong with mentioning perceived issues.

OTOH, I find your use of “we” irritating. What makes you think that you can speak for others?

4 Likes

Is there a misunderstanding here? What I think to be arrogance and hostility is not the act of raising concerns, but @meowky advising others not to use WeChat because of WeChat’s compatibility with DT and other problems unrelated to the thread’s issue.

In terms of “we”, I should clarify that WeChat’s flaws are widely recognized in the Chinese community. But in an international tech forum, it is indeed not appropriate to use “we”. If that irritates you I apologize.

Yet I still don’t see any actual solution to the issue itself. The only workaround so far is to reveal the file in Finder and then drag it from there.

DEVONthink provides a variety of information when dragging an item. It is up to the receiving application to determine what it processes and how.

2 Likes

Thank you, that’s really helpful. I am wondering if it’s possible for users to create an AppleScript such as ‘Copy as File’ that only puts the file itself in the clipboard. Might be helpful when the receiving application is not smart enough.

I don’t use WeChat so I can’t validate this.

  1. Open Applications/Script Editor.
  2. Select File > Open Dictionary and browse for the WeChat app. If it’s listed, there’s at least a minimal script dictionary. I’d guess there isn’t.

Have you tried sending via the Share menu? Again, I don’t know if it supports it.

Lastly, it appears there’s some sort of “file transfer” option in a chat. If that opens a standard macOS Open dialog, just drag and drop a file directly from your database in DEVONthink into that window.

1 Like

Is it safe to assume any user of WeChat is chinese? I’m not sure. No one can tell from these usernames directly that you’re chinese.

I perceive no arrogance or hostility in meowky’s reply. If you’re not already aware of the isssues, I think it’s only helpful to raise them.

OP only mentions WeChat in his third reply, and didn’t seem to have a problem using another app.

I have no experience with WeChat, so I don’t think I can help, but I hope you can find a solution that satisfies you.

2 Likes

I’ve created an AppleScript that only copies the file into the clipboard, tested in WeChat and Telegram. Not working in iMessage though.

use framework "AppKit"
use scripting additions

set pb to current application's NSPasteboard's generalPasteboard()

tell application "DEVONthink 3"
	set selectedItems to selection
	if (count of selectedItems) is 0 then
		display notification "No item selected." with title "DEVONthink"
		return
	end if
	set fileURLs to {}
	repeat with theItem in selectedItems
		set thePath to path of theItem
		if thePath is not missing value then
			set end of fileURLs to (current application's |NSURL|'s fileURLWithPath:thePath)
		end if
	end repeat
	
	if (count of fileURLs) > 0 then
		pb's clearContents()
		pb's writeObjects:fileURLs
		display notification "File copied to clipboard" with title "DEVONthink"
	else
		display notification "No valid file found" with title "DEVONthink"
	end if
end tell

I see your point. This information is useful for people unfamiliar with WeChat, and I initially overlooked that perspective. But for users like me who have no choice but to use it and want darg-and-drop to work as expected, this is the only thread I found. It is frustrating that instead of exploring a solution, this thread stalled in 2023, with the last response full of rants and simply advising me against WeChat.

It is frustrating that instead of exploring a solution, this thread stalled in 2023,

We just don’t have many people using WeChat or interested in the topic. :man_shrugging:t2:

Your script is interesting, but isn’t it simpler to select a document and press Command-C to copy it? I verified this works in Apple’s Messages app.

Sure, that’s simpler. This script is just a workaround for WeChat.

Does that mean a normal file copy/paste doesn’t work in WeChat?

I lack the proper context to understand why you would effectively have no choice but to use WeChat. If you don’t mind sharing I would like to learn.

Yes. Copying/pasting from DT to WeChat is not working. From my testing, if you paste a file from DT in WeChat, the inserted content follows this priority:

Extracted Text > Download URL > File Name

The actual file itself is never copied. That’s why I made an AppleScript for that. However, if you copy and paste from Finder, WeChat will recognize it as a file properly.

Well, WeChat has essentially monopolized the IM market in China. Unlike in many other countries where people have multiple messaging options, WeChat is overwhelmingly dominant here and has no real competitors (IM apps from non-Chinese companies are blocked, iMessage has a limited audience due to lower adaption of iPhones, Lark and DingDing exist but are limited to enterprise use). If you are Chinese, almost everyone around you (your friends, your clients, your co-workers, your boss) definitely has WeChat and also expects you to be on it. It’s the de facto standard for social interaction, to the point where people no longer exchange phone numbers anymore, they just connect on WeChat.

I also feel bad that such engineeringly terrible software achieves this level of dominance. But you know, it’s similar to how email is indispensable in the workplace. You wouldn’t expect a random person around you to use Matrix or XMPP, but they must have an email. That’s how WeChat is for most Chinese.

What happened to QQ?