是否可以通过悬停鼠标自动从本地驱动器上传文件? [英] Is it possible to automatically upload a file from a local drive by just hovering the mouse?

查看:63
本文介绍了是否可以通过悬停鼠标自动从本地驱动器上传文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我相信有人可以帮助我。任何帮助都非常感谢。



我正在创建一个Web应用程序,其中一个页面递归扫描服务器的D盘中的所有文件,使用网格视图显示它。



当我将鼠标悬停在位于图像文件名称上时,我想要做的是预览图像工具提示在D盘上。让这个变得复杂的是,浏览器不允许我出于安全目的而这样做,这是可以理解的。



现在我可以选择的选项是自动上传服务器的D盘中的图像文件,这样当我使用JavaScript通过鼠标悬停鼠标创建图像预览时,浏览器不会抱怨。一旦用户决定下载或只是查看它,页面将自动删除特定文件以节省内存。



我不希望用户单击上载或手动删除文件。我希望这一切都是自动的。



请帮帮我。我已经发布了相关的问题,但我重新发布它以检查并希望您能够帮助我提供上面提供的选项

Hi,

I believe someone out there would be able to help me. Any help is highly appreciated.

I''m creating a web application and one of the page is recursively scan all the files in the server''s D drive and show it using a grid view.

What I want to do is to have an image tooltip preview when I hover the mouse on the name of an image file that is located on the D drive. What makes this complicated is that the browser doesn''t allow me to do so for security purposes and that''s understandable.

Now the option that I can think of is to automatically upload an image file in the server''s D drive so that when I use JavaScript to create a preview of the image by just hovering the mouse the browser will not complain. And once the user decided to either download or just view it, the page will automatically remove the particular file to save memory.

I don''t want the user to either click the upload or delete the file manually. I want it all to be automatic.

Please help me with this. I already posted related question but I re-post it to check and hope that you will be able to help me with the option that I provided above

推荐答案

Hello Chris,



您可以使用 HTML5 FileReader 向用户显示图像,而无需在服务器上传!这可能会有所帮助预览图像而不上传到服务器 [ ^ ]



谢谢,

Imdadhusen
Hello Chris,

You can show your image to the user without uploading on server using HTML5 FileReader!! This might be helpful Preview Image without Upload to server[^]

Thanks,
Imdadhusen


这篇关于是否可以通过悬停鼠标自动从本地驱动器上传文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆