File upload with Javascript without user intervention - Stack Overflow

I have a Firefox ponent for PDF signing that I invoke via Javascript. The problem is that this ponent o

I have a Firefox ponent for PDF signing that I invoke via Javascript. The problem is that this ponent outputs the signed PDF as a file on the user's filesystem - there is no way to get a byte[], stream or similar.

I need to post this signed PDF file back to the server. Is it possible to do this in plain Javascript, without additional Firefox ponents?

I have a Firefox ponent for PDF signing that I invoke via Javascript. The problem is that this ponent outputs the signed PDF as a file on the user's filesystem - there is no way to get a byte[], stream or similar.

I need to post this signed PDF file back to the server. Is it possible to do this in plain Javascript, without additional Firefox ponents?

Share Improve this question asked Jun 10, 2010 at 13:08 daspdasp 9074 gold badges14 silver badges21 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 3

You can't do this without user intervention, this would he a huge security hole. Think about visiting a webpage and it being able to grab and upload any of your files without you doing a thing...you can see how this would be abused really fast.

You might be able to do this with a Firefox extension, I'm not sure of the security limitations it imposes (though I wouldn't be surprised if it disallowed this as well), but JavaScript would not be an option here.

There's no direct way to access data on a user's file system within a browser unless you're doing it through an extension. This would be a huge security risk.

If the file can be put into an <input type="file" /> element in Firefox, you can use JavaScript to automatically upload the data to the server without user intervention, but you would need something to initially get the file into the page's memory, not the file system.

Hell no - And for very good reason. You wouldn't want every Tom, Dick and Harry automatically grabbing all your files.

I believe it's the file input that needs user interaction. You can post the form automatically but you can't fill it in.

IMO your best bet is replacing the whole Firefox ponent with a single Java applet - I'd all but guarantee there's a Java project for PDF signing. Perhaps even Flash or Silverlight as long as you can do what you need with your PDF.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745368481a4624690.html

相关推荐

  • File upload with Javascript without user intervention - Stack Overflow

    I have a Firefox ponent for PDF signing that I invoke via Javascript. The problem is that this ponent o

    12小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信