作者:宾利Bentley乀Motors | 来源:互联网 | 2023-08-09 01:06
ImcurrentlymigratingmyprojectfromPHP(codeigniter)toRails3anditsamazing.ButImarail
I'm currently migrating my project from PHP (codeigniter) to Rails3 and it's amazing. But I'm a rails/ruby newbie so I've faced a problem which I don't know how to solve.
我目前正在将我的项目从PHP (codeigniter)迁移到Rails3,这非常棒。但是我是一个rails/ruby新手,所以我遇到了一个我不知道如何解决的问题。
I get new stuff on my site (A) from one certain site (B). It works like this:
我在我的网站(A)从一个特定的网站(B)得到新东西。它是这样工作的:
- On site B on a page I want to submit to my site I click a button.
- 在站点B上,在我想提交给站点的页面上,我点击一个按钮。
- Site B makes a POST request to my script on site A with an identifier of that page.
- 站点B对我在站点a上的脚本发出POST请求,其中包含该页面的标识符。
- I take this ID, and make a POST request with CURL back to the site B.
- 我拿着这个ID,用CURL返回到site B。
- Site B returns me a JSON feed with links to files.
- 站点B返回一个JSON提要,其中包含指向文件的链接。
- Then I use CURL to download the files with that ID.
- 然后我使用CURL来下载具有该ID的文件。
Sorry if the explanation is a bit cluttered.
抱歉,如果解释有点混乱。
For steps 1 and 2 I assume, I have to make a POST route and a method in some controller. But the rest isn't that clear to me.
对于步骤1和步骤2,我假设必须在某个控制器中创建POST路由和方法。但其余的我不是很清楚。
Additionally, in php project I hosted files on the same servers. And now I use heroku, so I need to put those files to S3.
此外,在php项目中,我在相同的服务器上托管文件。现在我使用heroku,所以我需要把这些文件放到S3中。
1 个解决方案