在应用程序内通过电子邮件从服务器发送文件
我对如何解决这个问题有点迷失。
我们有一个导入应用程序的文件列表,链接到远程服务器上存储的文件。目前,当在列表中选择文件时,它会在 safari 中打开,这很好。文件在 Safari 中加载后,您可以选择从那里转发,但我的客户希望能够从应用程序内访问该文件,而不是在 Safari 中打开。
我们正在使用查询手机和电话差距来创建应用程序。我正在考虑创建一封新邮件,并在电子邮件中嵌入文件的链接。
欢迎对此有任何想法或帮助。
I'm a little lost on how to achieve this problem.
We have a list of files brought into a app linking to the files stored on a remote server. Currently when the file is selected in the list, it opens up within safari which is fine. Once the file loads in safari you do have the option for forward from there, but my client wants to be able to it from within the app, rather than opening in safari.
We are using query mobile and phone gap to create the app. I was thinking about just creating a new mail, with a link to the file embedded in to the email.
Any ideas or help is welcome on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您只让移动应用程序向服务器发出 Ajax 调用来触发电子邮件和附件的发送,您的情况可能会好得多?这确实会降低移动应用程序的复杂性,并使您免受基于不同硬件或操作系统可能发生的任何问题的影响。
因此,当用户查看文件列表时,可以为他们提供两个按钮。查看并发送。 View 将按预期在 Safari 中打开,Send 将调用服务器来完成繁重的工作。
然后服务器加载正确的文件并将其发送出去,可能会用成功/失败消息响应客户端应用程序。
这种设计能解决问题吗?
You may be much better off if you just have the mobile app make an Ajax call to the server to trigger the sending of the email and attachments? That would really reduce the complexity off the mobile app and decouple you from any issues that might occur based on different hardware or OS's.
So when the user is viewing the list of files, maybe offer them two buttons. View and Send. View would open in Safari as intended, Send would make a call to the server to do the heavy work.
Then the server loads the correct file and sends it out, maybe responding the client app with a success/failure message.
Would that type of design solve the issue?
我创建了一个链接:
这似乎可以完成这项工作,打开默认的电子邮件客户端,其中包含设置值。
I have created a link:
Which has seemed to do the job, opens up the default email client, with the set values in them.