Comments (2)
- Upload only the image in the body
- Upload with one parameter and 1 image in body
- Upload a complex object that has an IFormFile property inside it
from mauisland.
@duydh1995 have done the investigation about this issue and found out some of the ByteArrayPart
and the StreamPart
type
On the server, asp.net seem to accept the DTO
But on the front end in order to make create such an accepted request that it has to be in a format like below
[Multipart]
[Put("/User/TestUpload3")]
Task TestUpload3([AliasAs("Id")] int id, [AliasAs("Name")] string name, [AliasAs("File")] StreamPart file);
I try do this for a cleaner code but the server quickly responded back 400 bad requests
[Multipart]
[Put("/User/TestUpload3")]
Task TestUpload3(TestUploadByteArrayPartDTO1 dto);
public class TestUploadByteArrayPartDTO1
{
[AliasAs("Id")]
public int Id { get; set; }
[AliasAs("Name")]
public string Name { get; set; }
[AliasAs("File")]
public StreamPart File { get; set; }
};
from mauisland.
Related Issues (20)
- [Enhancement]: RefreshView need more detail instruction how to perform a swipe to refresh
- [Enhancement]: Display Error HOT 1
- [Enhancement]: Implement layouts HOT 2
- [RnD]: Adaptive-Properties.MAUI HOT 1
- [Feature]: Validation Entry HOT 1
- [Bug]: CheckboxPage crash application when open in new windows HOT 4
- 🐞 SfRadialGauge crash when open in new windows HOT 3
- 🚀 TabbedPage unstable features HOT 3
- [Bug]: appsettings.Development.json doesn't ignore on git HOT 1
- [Feature]: Observable properties source generator HOT 1
- [Feature]: Warning open source users about appsettings.Development.json
- 🚀 Maui.Switch HOT 1
- 🚀 AcrylicView HOT 1
- 🚀 MAUI skeleton
- 🚀 Add Uranium ui kit gallery
- 🚀 Add live chart 2
- 🚀 .NET MAUI build workflow
- 🚀 mdc-maui HOT 1
- 🚀 XCalendar
- 🚀 Datetime-Picker
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mauisland.