Using Plupload with amazon s3 and asp.net MVC C# - c#

I am trying to use plupload http://www.plupload.com/ to upload images to an amazon s3 bucket and I want to also store the images urls in a sql server using asp.net MVC to be able to use them in the future. I am incredibly lost on exactly what to do. All the articles have really confused me.
Please help me in:
1) Re-size images to a maximum width and height on client size.
2) Upload images directly to amazon s3 (showing a progress bar).
3) Store image location in a database.
(How to link with plupload with MVC C# given that files are uploaded to s3 directly)

I can help with the post directly the S3 part.
I created a sample MVC3 app and put it on Github. It's currently setup for videos but if you change the content-type and some of the plupload settings it will easily work for images. This Ruby on Rails examples is configured for images:
https://github.com/iwasrobbed/Rails3-S3-Uploader-Plupload
Details on my blog:
http://blog.cdeutsch.com/2011/07/aspnet-mvc3-app-using-plupload-to.html
Github:
https://github.com/crdeutsch/MVC3PluploadToAmazonS3

Related

How could be ImageFlow setup as embedded IIS solution like the ImageResizer?

As far as I know the Imazen ImageResizer can be used as an embedded solution in the ISS. This means that, for example, a CMS located in the same IIS I will automatically deliver the images in an adjusted size via query parameters.
How this was configured can be found here.
The question is, how can this be achieved right away with Imazen's ImageFlow? In the same way that ImageFlow, like the ImageResizer at that time, automatically delivers the images resized by the IIS when they are delivered.
Currently, I have only found solutions where you develop and deploy an API with ImageFlow-dotnet-server to retrieve the images scaled over it. This has the disadvantage, however, that no credentials can be given when querying directly via an src-attribute of an img-Tag and thus no protection of the content is possible. If e.g. a CMS will deliver the content with images and ImageFlow just scales the images on delivery, I have automatically the authentication of the CMS for protection.
Do you have any ideas or approaches for an embedded solution with ImageFlow in a self-hosted IIS, like ImageResizer supports?
Update #1 // 2020-07-23 // extend description
I'm using the CMS DNN (DotNetNuke), the image path in an img-Tag is relativ like /Portals/1/myImage.jpg. Hence with ImageResizer I have just to add query parameter for resizing like /Portals/1/myImage.jpg?width=400 before delivering the contentn to the client. This is possible, because I'm using the embedded solution by adding the ImageResizer.dll to IIS-Web root and extending the web.config.
For ImageFlow I have implemented a stand-alone ASP.NET Core Web App like described on GitHub. So it's deployed in its own IIS-Web, not like ImageResizer in the DNN IIS-Web directory. Therefore, I have to load the images via the ImageFlow API like https://my-img-flw/Portals/1/myImage.jpg?width=400, because the ImageFlow service has access to the DNN files by file system. That's configured by .SetMapWebRoot(false).MapPath("/", physicalPath). But that's not an embedded approach like ImageResizer provides, because I have two separate IIS-Webs.
If further information is needed, please let me know. Thank's in advance!
Because Imageflow.NET Server is written for ASP.NET Core, and you're on ASP.NET 4.x, you can't use them in the same application and take advantage of blended authorization systems. You would have to duplicate your authorization system in ASP.NET Core.
ImageResizer 5 will bring Imageflow to ASP.NET 4.x, so you could also consider waiting for that. We do not have an ETA yet.

ASP.NET WebAPI - Upload big files using streaming

I have the following business requirements:
User should be able to upload files (max file size should be 20GB) to ASP.NET MVC web site and then this web site should pass these files to ASP.NET Web API web service and then web api will save these files to hard drive.
The problem is: ASP.NET and IIS have limitations for file size - 2 GB (this is max size).
My questions is: how to implement these requirements? And how to do it in the best way (may be I should use file streaming or divide big files to smaller)?
I will very appreciate for any good detailed advices!
Thanks.

Upload a video using asp.net MVC WebService

I want to upload a video file using asp.net mvc . I am sending the file as postbody. How can this be retrieved later from the server using webservice. I have seen this example . Also this question helped me to understand it more. But I m not sure how to fetch post body.
But no sure how this works. How to do his properly in .net c#
In order for the file to be available later, you need to save it somewhere during the upload - either to a database or a folder on the server. Then, your web service needs to know how to retrieve it from that location.

upload pictures to picasa in WP7

I want to upload photos to picasa using C# in WP7. Where I can download the picasa API's for WP7. It would be really nice if there is an example on how to authenticate and also upload photos.
There are some examples available:
Getting started with OAuth in C#
Uploading picture to picasaweb
Please share your solution if you manage to get it to work

Web cam integration in .net MVC

I am a new bee to this .net MVC basically i am from PHP. I am trying to integrate web cam in my MVC app. I am using Flash to integrate it, I have written an action script to capture the image from web cam, but i am unable to upload it to DB. I tried with communicating javascript and and actionsctipt but its not working out for me. Any valuable inputs for me is appreciated
Plz help me anybody....... :(
Sameer Joshi
You'll need to post the file from your Flash applet to a .NET page / service / http handler / MVC Action which will actually write the image to your DB.
I would suggest simply posting the file to an appropriate action on an appropriate controller. An action along the lines of (assuming this is in the "Files" Controller)
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult SaveFile(HttpPostedFile uploadedFile)
{
// write file to DB / save to disk here
RedirectToAction(......);
}
So from your Flash applet, you'd post the file to www.site.com/files/savefile
You may also check Silverlight 4 support for microphone and webcam.
Webcam and Microphone Showcase
George.

Categories