Question about file upload
See original GitHub issueHi guys,
I managed to upload a file in the folder I wanted, but is it possible to change the filename before the file is uploaded? I’d like the file associated to a post gets the name POSTID.jpg when uploaded (where POSTID is the post id…).
Here’s my code atm:
post.creationView()
.fields([
nga.field('created_at', 'date')
.defaultValue(new Date())
.validation({ required: true }),
nga.field('content', 'text'),
nga.field('image', 'file').uploadInformation({ 'url': 'MYBASEAPIURL/api/containerPosts/posts/upload/'}), //i'd like to have an image named: nga.field('id') + '.jpg' - Is this possible?
nga.field('userId', 'reference')
.targetEntity(user)
.targetField(nga.field('email')
.validation({ required: true })
]);
Best regards.
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
File Upload Question - Qualtrics
The file upload question type allows respondents to upload a file along with their survey response. Using file upload, you can collect data...
Read more >Use file upload questions to create engaging surveys - Voxco
A file upload question is used in online surveys that enables respondents to attach some files or documents in order to support their...
Read more >File Upload question - Help Center - Typeform
The File Upload question is a Basic account and higher feature that allows respondents to upload a file from their computer or mobile...
Read more >Create File Upload Questions - WebAssign
Create File Upload Questions · Click Questions > Create. · In Name, type a name for the question. · In Mode, select File-Upload....
Read more >File Upload Question - SurveyMonkey Help
Drag and drop File Upload into your survey from the Build section. Enter your question text. Adjust the settings under the Edit and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@FelixMalfait did you find any solution to get entity ID?? What I need is to pass the entity ID in the url to save the image en DB.
Got it working by writing a directive like this:
And using it like this: