PWA app to detect when camera on mobile has taken a picture - events

I want to launch a Progressive Web App whenever a camera on a mobile device has taken a picture.
When a picture is taken I want to captured extra metadata and upload the picture to a server in the cloud and the metadata to a database in the cloud. I know how to upload pictures and metadata.
I want to launch the Progressive Web App when pictures are taken to enable the user to enter extra metadata and store the picture in the cloud.
Is it possible and where can I find information on how to accomplish this?

Related

With a Spring MVC webapp, can you take a photo on a mobile device and upload it to the server?

I was asked to write a webapp using Spring MVC that among other things it must either take a photo on a mobile device or at least upload it from the device's photo library. Apparently we have some product (probably .NET based) that allows taking/uploading photos from the a web page displayed on a mobile and is where they got the idea from. Most devices will be iPhones but some might be Android.
Is this even possible with a Spring MVC webapp - with no code on the mobile device?
If yes, how would you go about designing this? Is it simply a matter of implementing a file upload as you would from a PC and trust that the mobile device will somehow magically handle the "take a photo" or "pick the photo from the image library", or is there more to it?
Is there anything else I need to know about?
Yes, although I am experienced with Spring MVC and even "normal" webapps that are accessed from a mobile... I am clearly clueless about this type of "photo" app.
write the web app allow access to the camera through the browser of device, when the users take the photo send it to web app or simply create the form allow user select image from device. ( with browser of device you can access camera or folder on device

Optimize and host images in Azure?

I'd like to host images for my website on Azure. The images should be compressed and available in different resolutions.
Of course, I could just compress and scale the images by myself and put them in a blob storage.
But is there a way to let Azure do the work for me?
I want to upload an image in a very high resolution and Azure should create versions in different resolutions and compress them. After that the image should be published so that I can retrieve it from my website.
Is there a better way to host images than Azure blob storage?
You can create an Event Subscription that will respond to the blob storage uploaded event, after that, an Azure Function will be triggered and will handle the event by creating a resized version of an image and copying it to a separate storage container. This is an auto-scale solution. An example that exactly describes your situation can be found on official microsoft docs page Tutorial: Automate resizing uploaded images using Event Grid.
Event Grid enables Azure Functions to respond to Azure Blob storage events and generate thumbnails of uploaded images. An event subscription is created against the Blob storage create event. When a blob is added to a specific Blob storage container, a function endpoint is called. Data passed to the function binding from Event Grid is used to access the blob and generate the thumbnail image.

Where can I store a user accessible Google Slides template?

I'm currently working on a website which allows reports to be generated and saved as a Google Slide via the Google Slides API. The reports are generated using a template slide which contains placeholder shapes which are then populated with graphs and text.
My problem is that the template Google Slides file needs to be accessible to any user who decides to generate a report. But...
Google Drive can only be authorized via oAuth. Users coming to the site will not be able to authenticate any drive which does not belong to them
The template cannot be stored in the codebase as the slides API is only able to interact with files stored in the cloud AND it is not possible to download a file in 'Google Slides format'
It could be possible to store the template on Google Cloud Storage, but it is not possible to import a Slides file without converting it to another format. Attempting to convert the file once it has been uploaded does not produce a new slides file within the cloud storage
Is there anywhere I could store my Google Slides template and have it accessible to my application at all times so that it may generate reports based on that template?

Set content type of azure blob to image in WP7

I am uploading a stream of photo from my phone camera to azure. I am uploading e.ChosenPhoto which is a stream of the taken photo and i am using blob.Metadata["ImageType"] = "image/jpeg"; but still, when the photo is uploaded the content is marked as application/octet-stream and when i go to the url the browser download the photo instead of displaying it.
What steps do i need to do in order for it to make it jpg ?
EDIT: it seems that the library that comes with WAT for WP - WindowsPhoneCloud.StorageClient.dll
doesn't support blob.Propeties at all. (maybe because WP only support async calls ?) Is there any workaround on setting the content type ?
Try setting blob.Properties.ContentType = "image/jpeg".
Unless the SAS is used, it is highly recommended that we use a cloud service to upload blobs. If we upload a blob directly from Windows Phone without SAS, we have to embed our storage account key in the Windows Phone application. If a hacker gets the key, he will obtain full control of our Windows Azure storage account. For example, he can upload several TB data to the storage, and requires us to pay for the data. So instead of trying to upload the blob from Windows Phone, please try to host a service in Windows Azure. We upload the image to our service, and our service saves the file in blob. As long as we don’t return the storage key in any response, it will be safe.
If we have to upload directly from Windows Phone without SAS, we may need to manually use the REST API for the scenario to work. According to http://watwp.codeplex.com/discussions/352111 , the WAT library doesn’t allow us to specify a content type. In addition, I would like to point out that WAT is just a toolkit. It is not a built-in Windows Azure component.
Best Regards,
Ming Xu.

how do I upload a photo to facebook from my app, and have it NOT post to the wall?

My iPhone app uploads pictures to the user's Facebook account, and they are automatically placed in the app's photo album on Facebook.
In the majority case, the user's wall is also automatically updated to denote that the photo was recently updated. But I dont want this, because I prefer to make a separate wall post with a link to the photo. It's silly for the user's wall to have two entries on it with a thumbnail of the same image.
1) how can I upload the photo using the graph API in such a way that it isn't announced on the user's wall
2) how can I tell if the photo upload resulted in an announcement on the user's wall -- sometimes it doesn't. I'd rather not have to ask for permissions to read the user's wall..
From this Facebook Doc:
If you would like to suppress the story that is automatically generated in the user's feed when you publish a photo (usually because you plan on generating your own), you can add a no_story=1 parameter. In this case, the user will receive a notification that your application has uploaded a photo.

Resources