How to check if a picture was taken by the user or not - file-upload

I've recently run into some trouble in a Web app I'm developing. In this Web app I allow users to upload pictures and I need to check -to a certain extent- that the pictures they upload were taken from their own cameras, webcams, mobile devices, etc.
If I can't guarantee that the image being uploaded "belongs" to the user (e.g. was downloaded from somewhere on the internet, made in Paint, etc.) the file is discarded, otherwise it is stored.
I know any method to implement this will be highly inaccurate and will produce many false positives -or negatives- and that there is no bulletproof solution, but I'm just looking for a tentative way to do it.
So far I've thought of
checking if the picture has Exif data present and if so, if it's
date is relatively recent, store it
providing the option to take "snapshots" from the user's webcam like Facebook does
for the profile picture
Are there any other ways to do this?

Related

Accessing the localStorage of one device from another in react-native

Some days before, i saw a blog post about why we need to keep whatsapp open on our smartphone to make it work on our PC.
It said that WhatsApp fetches the data (messages) from our smartphone and shows them on our pc which seems pretty good as it will lower the load on our database.
So now i wanted to know if there is a way to do so in react-native i.e, access the localStorage of one device from another.
Why i want to do that?
I am building an app where in the profile, i also take the profile picture from the user and i don't want to store it on the database but instead store it locally and serve it from there.
The reason for that is that we need buckets to store media files and serve them from there and i wanted to cut that part when deploying my app.

Best practice for bulk uploading to Street View Publish API?

We're currently in the process of recording 1fps time-lapsed 4k 360 photos of every island in the Bahamas, with embedded GPS EXIF data. An average hour of filming tends to produce around 600 image frames, which can easily expand to 2000-10,000 images per day on bigger routes. 2000 or so are approved on Google Maps already, but we're hitting a larger brick wall.
The Street View app is obviously the best way to upload when you have 50-100 image files, but it obviously struggles when it starts to hit over 500+ uploads in a batch (publishing doesn't start, or the app crashes), so we're left manually submitting collections. Add that to the standard 4000/day quota, and it's quite a challenge.
Having looked at the Publish API, it's rather tricky to leave a CLI tool running as it's designed with OAuth flow in mind with 1hr access tokens. The service account route seems to the way to go, but the PHP API client seems to have scant documentation for SV Publishing. Connecting photos is also tricky with that many images.
We ideally need a desktop uploader (like the backup tool), or a way to directly import from folders in Google Drive. The first seems discontinued, and there's no data on the second.
Can anyone explain or elucidate on the best practice for this kind of volume upload with the Street View publishing service?
Since you are only capturing 4K images, it will be much simpler to use video mode, depending on if your camera supports it at the desired framerate. You may check this documentation for more information.
Additional information:
You may also check out some of the desktop utilities at the bottom of the Street View website which may be able to help.
You may want to consider one of the Street View ready cameras (also listed on the above webpage) that is capable of recording and uploading 360 videos to Street View. Upon publication, the 360 photo frames are extracted from the video and used to create an automatically connected Street View experience on Google Maps.
Check these pages to learn more about this option:
Set up and connect 360 cameras
Capture and publish in Video mode with the Street View app
Tips for capturing 360 videos for Street View

Camera feature on UWP

I am a student that is currently developing an UWP application. And I am trying to build a camera feature within my program. I have tested out this set of sample codes from Microsoft
https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/CameraStarterKit
But I want to modify a little from the codes.
Here is what I am trying to do:
I wish to have a preview screen to show the user the photo their have taken and if they are not satisfied with it they can retake it. I am not very sure how to show a preview of the photo taken.
I do not wish to save the photo on my local storage, but instead, allow the user to send the photo they have taken to their email by typing in their email address. The main question will be, do I have to store the picture somewhere in order to send them out?
I can tell you already have the hard part figured out. Let me answer with some advice: save the file to a local folder. You can easily save the file to the Temp folder. It costs you nothing, and you don't balloon your memory footprint while you are at it. When the user wants to send, you can send it from the folder - and that is easy. Don't make things harder on yourself with difficult requirements that don't do anything but add complexity and fragility to your app. I hoe this makes sense, please take it with the utmost respect.
Best of luck!

Which is a better way: retrieve images from AWS S3 or download it and store locally in a temp folder to be displayed?

Problem: Retrieve image from S3 and load into UIButton.
I'm currently doing my research on this issue and can't seem to make up my mind. Which is a better way to do it in terms of performance and security issue?
Also, do I need to do caching or store these images in Core Data?
Thanks!
It depends on how you use them. If your app is going to retrieve the images similiar to instagram, or twitter, it's good to download them as the user requested the images via the app.
If once the images are retrieved, the application going to use the images again and again multiple times, it's a good idea to store the images after they are downloaded.
For example, let's think about an application about "social networking" concept, and this app, let's say, has a chat interface which is functional after users add each other. As the users add each other, you download the images of the users and store them on the device, then you can use the profile images of the users by retrieving the locally stored images rather than retrieving them from the server, thus, each time they chat each other, you dont use the bandwidth for nothing. And you should also use a push notification or something that has a similiar functionality for the scenario, when a user changes his profile pictures, all of his/her friends should also be notified (I mean the app is going to be notified by the server) to retrieve and update their local profile image with the newly added ones.
As I said, it depenends on the scenarios of your application/server relationship. If the images you are storing on the AWS S3 are only going to be used only once, then storing them is useless. And If the user is going to use some of the images frequently (like app is a social networking app, friendship app and the friends are going to see each other's photo or uploaded images frequently), then storing them is a good idea, only for some of the users that who has subscribed to each other.

Streaming movies from my server

I'm playing around to make an app that lets people stream cartoons that I make. It's a very simple app, one ImageView is just loading in a html-homepage in a UIWebView. Witch contain links to .mov files. So if you tap them a movie will start playing. This is because I just want to update the html-file with new cartoons every week.
Is this an "ok" way to do things code:ing-wise? Or am i obligated to us some Objective-c streaming functions?
Is there a specific file-type that i have to use in the movie-files on the server?
Is the HTML static in your app, or does it point to a server? If it's the former, you may be able to get the app approved doing it the way you suggested, depending on the reviewer. If it's the latter, you're unlikely to get it approved by apple.
They tend to frown upon web sites bundled into apps, and will tell you to simply make your website usable with the phone. See section 2.12.
My suggestion is to spend a bit more time and offer iOS users a better - and more immersive - experience than is available via the web. As I'm sure you've found, there are many built-in ways to stream movies and to present them in a manner that surpasses a web-page-like experience.