Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature]: upload image from local system #34

Closed
roymj88 opened this issue Jan 2, 2018 · 8 comments
Closed

[feature]: upload image from local system #34

roymj88 opened this issue Jan 2, 2018 · 8 comments
Labels
Status: Completed A Task is completed Type: Enhancement Improves existing functionality Type: Feature Yay! New Feature

Comments

@roymj88
Copy link

roymj88 commented Jan 2, 2018

Is there an option to upload file via browse instead of uploading through link?

@sibiraj-s sibiraj-s added Type: Feature Yay! New Feature Type: Enhancement Improves existing functionality labels Jan 2, 2018
@sibiraj-s
Copy link
Owner

Currently not included but I have been working on it.

@sibiraj-s sibiraj-s changed the title Image upload from local system via Browse [feature]: upload image from local system Jan 18, 2018
sibiraj-s added a commit that referenced this issue Feb 19, 2018
@sibiraj-s sibiraj-s added Status: Completed A Task is completed and removed work in progress labels Feb 19, 2018
@lruiz-invidgroup
Copy link

How works the image uploader, the POST method need something in the return?

@AnelR
Copy link

AnelR commented Apr 17, 2019

Good day,

I am using the npm NgxEditor control in my Angular 7 project. The upload works fine in uploading the file but when the url is returned the page reloads instead of just inserting the image in the editor so I can continue editing. Inserting image via the URL works 100%, it adds the image in the editor and I can continue typing in the editor.

Is it possible to set the buttons to hidden? Example: Only allow upload of files.
Image Upload

@mateuspmello
Copy link

Good day,

I am using the npm NgxEditor control in my Angular 7 project. The upload works fine in uploading the file but when the url is returned the page reloads instead of just inserting the image in the editor so I can continue editing. Inserting image via the URL works 100%, it adds the image in the editor and I can continue typing in the editor.

Is it possible to set the buttons to hidden? Example: Only allow upload of files.
Image Upload

How did you implements this?
I'm having this problem: Cannot POST /assets/img

@AnelR
Copy link

AnelR commented May 10, 2019

In my html I have the following:
<app-ngx-editor #edtTest name="edtTest " [config]="htmlEditorConfig" height="300px"
minHeight="300px" [spellcheck]="true" [(ngModel)]="bindingModel">

In TS file:
htmlEditorConfig = {
editable: true,
spellcheck: true,
height: "10rem",
minHeight: "5rem",
width: "auto",
minWidth: "0",
translate: 'no',
enableToolbar: true,
showToolbar: true,
placeholder: "Enter text here...",
imageEndPoint: this.imageUploadUrl,
toolbar: [
["bold", "italic", "underline", "strikeThrough", "superscript", "subscript"],
["fontName", "fontSize", "color"],
["justifyLeft", "justifyCenter", "justifyRight", "justifyFull", "indent", "outdent"],
["cut", "copy", "delete", "removeFormat", "undo", "redo"],
["paragraph", "blockquote", "removeBlockquote", "horizontalLine", "orderedList", "unorderedList"],
["link", "unlink", "image"]
]
};

the imageUploadUrl = ${this.baseUrl} + '/image/uploadfiles' -- this is my API url (http://MyApplication/Api/UploadFiles) that uploads the file to the assets folder and then returns the url location in url form. Example http://MyApplication/assets/uploadedimage.png"

API Method
[HttpPost("UploadFiles")]
public async Task UploadFiles(List < IFormFile > file)
{
return "http://MyApplication/assets/uploadedimage.png"
}

@AhmedHlaimi
Copy link

@AnelR can u give us ur response obecjt

@Sivakaresh
Copy link

@AnelR is it possible to get API method implementation for more illustration?

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Completed A Task is completed Type: Enhancement Improves existing functionality Type: Feature Yay! New Feature
Projects
None yet
Development

No branches or pull requests

7 participants