I have Drupal installed to Amazon EC. I was wondering is it possible to make another database so that mobile users can upload pictures with location there and users from the Drupal website can see these pictures? What would I need to do?
-
Yes, it is possible make another database where mobile users can upload pictures with location data. To make these visible on the Drupal website, you should hire a consultant to write a custom module to integrate the two. Alternatively, you can just drop the second, external database and let your mobile users interact with Drupal directly.– Free RadicalCommented Feb 22, 2015 at 14:49
-
Hi and thank you for your answer! Im very newbie what comes to Drupal and Mobile apps but what if I had another DB somewhere in Amazon, Is it easy to write a module to just show data from that second DB? I think I would have some trouble with authenticating people if they use Drupal DB directly from mobile client!– hepsuCommented Feb 22, 2015 at 14:59
2 Answers
You need something like next, right?
- User upload image from mobile application
- User can see it in site
If it's right - it's not need new database, all can be maked with one. As one method - you can create special node type and one of next things:
- Create custom module, that create new nodes (in my opinion - it's better)
- Submit node creation form from application
-
Hi and thank you for your answer! Well the app will be similar to Tinder dating app. Users with mobile phones upload photos with location and they will see other user's photos in the application. Drupal site would be for those who prefer using website rather than mobile app!– hepsuCommented Feb 22, 2015 at 16:30
I am not sure if you are approaching this from the right angle.
First, to answer the question you're asking: Yes, it is trivial to make Drupal show data hosted elsewehere. Just link to it using the URL, (with some secret key that is authentcated on the receiving end if the data shall not be exposed outside of Drupal's access control). A custom module with about 15 lines of PHP should do this bare bones with pictures. You shall of course need some extra code to handle transfer of other data types (location, title, byline, license, access level, etc.) However, I am not sure this is the best solution.
Here is my suggestion for an alternative approach:
The Drupal login dialogue is not the only way a user can authenticate with Drupal. For instance, if you want to use a native app to interact with Drupal, you may use the deviceID for authentication, or the user may register the app once. To do this, you just need to let the programmer write a custom authentication module for your Drupal site, to exchange authentication credentials with the mobile app. It is not hard to make this authentication handshake (between the app and Drupal) invisible to the user.
Or, if the user is using a browser on their smartphone, he/she may authenticate by logging in on the site using Drupal's standard login dialogue before uploading the image using Drupal's build-in file upload.
Whether you implement the client end as a native app, or you just use the smartphone's browser, interacting with Drupal directly instead of interacting by means of a secondary DB seems to me like a better approach.
-
Hi and thanks for your answer! I am not expecting anyone to write this for me, I just want to make sure I am on a right track! The client side will not need any log in.. it is based on the deviceID and it makes you a personal ID which would be used with adding pictures / removing them! The client without any log ins is a mandatory feature which we would like to have! I was just wondering this approach since we are hiring a programmer but first we need to know what exactly we want!– hepsuCommented Feb 23, 2015 at 7:05
-
I've updated my answer to point out that you can make Drupal use the deviceID for authentication (by means of a custom authentication module). Commented Feb 23, 2015 at 7:14