devbetter-net / devweb

to build a web application quickly using .NET
0 stars 0 forks source link

media plugin #7

Open devbetter-net opened 1 month ago

devbetter-net commented 1 month ago

upload image get image create thumbnail get image by width size

devbetter-net commented 1 month ago

Domain/entities Picture (id, seoFileName, alt, title properties, mime type) PictureBinary (if store in database) Video (id, videoUrl)

devbetter-net commented 1 month ago

https://learn.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads?view=aspnetcore-8.0#upload-small-files-with-buffered-model-binding-to-physical-storage

https://learn.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads?view=aspnetcore-8.0#upload-small-files-with-buffered-model-binding-to-a-database

https://learn.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads?view=aspnetcore-8.0#upload-large-files-with-streaming

devbetter-net commented 1 month ago

Common storage options for files include: Database For small file uploads, a database is often faster than physical storage (file system or network share) options. A database is often more convenient than physical storage options because retrieval of a database record for user data can concurrently supply the file content (for example, an avatar image). A database is potentially less expensive than using a cloud data storage service. Physical storage (file system or network share) For large file uploads: Database limits may restrict the size of the upload. Physical storage is often less economical than storage in a database. Physical storage is potentially less expensive than using a cloud data storage service. The app's process must have read and write permissions to the storage location. Never grant execute permission. Cloud data storage service, for example, Azure Blob Storage. Services usually offer improved scalability and resiliency over on-premises solutions that are usually subject to single points of failure. Services are potentially lower cost in large storage infrastructure scenarios. For more information, see Quickstart: Use .NET to create a blob in object storage.