开发者

Way for user to add multiple phone numbers to server-side db?

Working on a webapp that will allow clients to add their customer-phone list. What's the best way to implement this 开发者_运维技巧in Rails? One form that asks the user to separate by comma? Multiple forms? Upload an Excel spreadsheet? Thanks in advance.


If you want your client to be happy, it would be a good idea to just ask the client what they think is the easiest way to add the customer phone-list. Then ask Stack Overflow technical questions when you run into a problem.


If its a phone list just have them send you the data as TAB delimited or comma-seperated values (CSV) format, which also splits records by a newline. Chances are that phone list was given to them in Comma or Tab delimited .txt files to begin with so it will be easy for them to send you the data format. Furthermore, any respectable data program has the ability to export data in this format, making it much more transportable and usable when it actually gets to you.

Anyway, this list can then be imported into almost any type of database imaginable. Just have them ZIP and upload the the .txt or .csv file to your server, your app can then physically store than file on the server for later processing, you can further this by attaching the upload functionality in your app to a database which ties the user to the file per-se. But yeah, by far, COMMA or TAB delimited format is the way to go. I myself have found TAB delimited records to be much less prone to importing errors than comma separated values. To make this a secure transfer simply add an HTTPS server into the mix.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜