Yes, I looked at the code for saving images in the database, but I was going to go with a file system for now. I want my client to be able to upload multiple files at once and use blueimp jquery upload. I'll save the files here:
private void SetAppFolders()
{
var appFolders = IocManager.Resolve<AppFolders>();
appFolders.SampleProfileImagesFolder = Path.Combine(_env.WebRootPath, @"Common\Images\SampleProfilePics");
appFolders.TempPath = Path.Combine(_env.WebRootPath, @"Temp");
appFolders.TempFileDownloadFolder = Path.Combine(_env.WebRootPath, @"Temp\Downloads");
appFolders.WebLogsFolder = Path.Combine(_env.ContentRootPath, @"App_Data\Logs");
appFolders.UploadImages = Path.Combine(_env.WebRootPath, @"Common\Upload");
appFolders.Thumbs = Path.Combine(_env.WebRootPath, @"Common\Upload\Thumbs");
I opened the NuGet Package manager and updated everything. That cleaned up almost all the errors. The only one I had to manual fix was: jquery.sparkline.js
v2.1.2 <a class="postlink" href="http://omnipotent.net/jquery.sparkline/">http://omnipotent.net/jquery.sparkline/</a>
My major concern is database schema changes after my aspnetzero project is in production. Anybody with experience please advice.
Thanks.
I'm taking small steps with my file upload functionality in my aspnetzero project and would like your opinion/advice.
My current functionality: User can upload multiple files.
Currently developing: create guid for each file uploaded. save image attributes to database. create image grouping for gallery.
Future development: save images in Azure storage
Where do you recommend I save uploaded images within the folder structure? I want to use the private method already created:
private void SetAppFolders()
{
var appFolders = IocManager.Resolve<AppFolders>();
Should I save the images in:
Web.Mvc project contains the presentation/API layer (Controllers, Views, javascripts, styles, images and so on) for backend and frontend applications.
or
Web.Host project does not contain any view/css/js files. Instead, it just serves the application as remote API. So, any device can consume your application as API.
Thank you.
I'm currently implementing Blueimp file upload into my aspnetzero example solution.
Once completed, I'll fork.
This is MVC5, but works very nice for multiple upload and gallery:
<a class="postlink" href="https://github.com/CodeHeight/jQuery-File-Upload.MVC5">https://github.com/CodeHeight/jQuery-File-Upload.MVC5</a>
Check out that attachment...upside down image. :lol:
1 - Yes, "ListResultOutput" has removed: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1402">https://github.com/aspnetboilerplate/as ... ssues/1402</a>
What I have been doing is coming to this forum and using the search textbox. That's how I found the solution for "ListResultOutput".
2- Compare with Githubs source code. Do it manually. The tutorial is a little out of date, but it still is a good way of learning the platform with simple examples.
Logs from azure server:
ERROR 2016-10-21 12:42:21,610 [28 ] e.Diagnostics.ExceptionHandlerMiddleware - An unhandled exception has occurred: The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating.
System.Security.Cryptography.CryptographicException: The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating.
at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope)
at System.Security.Cryptography.DpapiDataProtector.ProviderProtect(Byte[] userData)
at Microsoft.AspNet.SignalR.Infrastructure.DataProtectionProviderProtectedData.Protect(String data, String purpose)
at Microsoft.AspNet.SignalR.PersistentConnection.ProcessNegotiationRequest(HostContext context)
at Microsoft.AspNet.SignalR.PersistentConnection.ProcessRequest(HostContext context)
at Microsoft.Owin.Mapping.MapMiddleware.<Invoke>d__0.MoveNext()