Need the upload profile feature with following functionality:
Uploaded image validations. (type, size)
Save the image in a different directory.
After uploading user should be able to re-position the image properly, so that the avatar looks
properly aligned as the users wants.
Crop the image.
What are the solutions to implement this in ASP.Net with C# ?
for croping image please read these article
article
codeplex
there will be problems if you save image to different folders ie folder permission the domain host companies do give permission read only if you save it to another folder you have to give permissions to each folder. there is another way you make a root folder with read and write permissions and then in that folder save your username name of folder
you can get the size and width and height if you use valum
Related
I need the user to be able to upload an image, and then have the image be able to be accessed later for drawing it. I only know how to show an image in the Android Resources/drawable folder. I don't think it is possible for a user to upload an image there, so is there another place they can upload it, and then have the image to be used? I don't know how to have the user to be able to upload it either.
I only know how to show an image with the xaml code <Image Source="image.png"/>, where image.png is in the Android Resources/drawable folder
Since Resources contained in out raw directory of our project will be packaged inside our APK and will not be writeable at runtime.
So I highly recommend that you use Internal or External Data Storage to store your images and text file.
For more details, you can check: https://learn.microsoft.com/en-us/xamarin/android/platform/files/
And at the bottom of this page:External storage, there is a example which function is to save text file in External storage, it should be helpful for you.
The sample link is here: https://github.com/xamarin/monodroid-samples/tree/master/LocalFiles
If you want to choose Photos and Video, you can use MediaPlugin of jamesmontemagno. Of course , you can achieve this function yourself.
I'm building a windows C# Drive App, and wish to display the thumbnails for a handful of folders.
For files that exist in a drive, I know you can get the icon by using the IconLink parameter.
How can I do this file that doesn't exist (yet), using the MimeType of the file?
If you have the file extension you can get this from the registry, for example:
HKEY_CLASSES_ROOT
.avi
On my machine, the (Default) value on that key is VLC.avi.
Now find the key with that name:
HKEY_CLASSES_ROOT
VLC.avi
And there you should find a subkey called DefaultIcon, which in my case has a (Default) value of "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe",0
From here you should be able to get the icon from .exe path.
Sometimes DefaultIcon contains the path to a .dll followed by an index. For these you could check this SO question for details on how to extract the image itself.
You may want to try Uploading thumbnails. As discussed,
For shortcuts and other file types that Drive can't render, you can provide a thumbnail image generated by your application. Upload a thumbnail by setting the contentHints.thumbnail property on the File resource during an insert or update call as follows:
Set contentHints.thumbnail.image to the URL-safe Base64-encoded image
Set contentHints.thumbnail.mimeType to the appropriate type for the image format
If Drive can't generate a thumbnail, it will always use yours if you provided one.
In addition to that, note that thumbnails are invalidated each time the content of the file changes. When supplying thumbnails, it is important to upload new thumbnails each time the content is modified.
Also, check suggested solutions in the following SO posts and see if it will help you:
Permanent links to thumbnails in Google Drive API
Unable to get thumbnail using Google Drive API
Where and how should files be saved and accessed, e.g. Images downloaded by my application and then visible from my app.
Scenario:
I give my app URLs to images placed online on random places. The app downloads them and saves them "somewhere". Saved images are used as news article images in my app. Files should be accessible in the Photos app.
Save your data to ApplicationData.LocalFolder, it is intended for exactly this. But your data will not be visible outside your app. If you want to make some photos accessible in the Photos app, you need to save them to the Windows.Storage.KnownFolders.PicturesLibrary folder.
The user uploads an image which I name as logo.png and I save it in a folder. The user can upload new image anytime he wants. I have 7 files in the same folder.
I get that image via API. At the moment, I download the image every time I run my program. What I need is a flag to know if the user uploaded a new image than the one I already downloaded. If not - don't download the file. if yes - download it. How can I find out if the user uploaded a new file?
I know that I can use a db field for this, but is there a property of the Image class, or the FileSystemInfo class which can tell me this?
FileSystemInfo has LastWriteTime property which Gets or sets the time when the current file or directory was last written to.
refer this link : http://msdn.microsoft.com/en-us/library/system.io.filesysteminfo.lastwritetime(v=vs.110).aspx
How to manage user picture in c# for my web application
i want all images as
1.png 2.png 3.png if user upload GIF and jpeg that it is convert to .png
how i can do this.
Phil Haack just wrote about Uploading a file (or files) with ASP.NET MVC.
This will give you a good starting place with your image upload requirements.
Once you've obtained the image from the user you can name it anything you like before saving. You could store all images together and link the user to the image via a database entry or you could create a user image folder and store the image in there.
There's a huge variety of ways you can accomplish your goal so these are just a couple of sugestions to help you along the way.