Comments (8)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from attachment-lite.
Closing in favor of the PR.
from attachment-lite.
@thetutlage I am facing the same issue? Any fix or workaround?
from attachment-lite.
@hbatalhaStch the workaround would be to just treat the save
function as if it is not returning anything.
So instead of chaining model.save().otherMethod();
use model.save(); model.otherMethod();
.
Or instead of returning return model.save()
use model.save(); return model;
from attachment-lite.
@aa-ndrej thanks for the tip.
I have a question though: I am using the return of model.save()
to check if save was successful, is this a good way? Is there a need to check if save was successful?
from attachment-lite.
@hbatalhaStch you can view the source code of the models save
function if you navigate to node_modules/@adonisjs/lucid/build/src/Orm/BaseModel/index.js
. I do not have that much experience with adonisjs
but as far as I can see the function just returns return this;
, so it is not really indicating that the model was successfully saved.
But I would assume that the save
function would throw some kind of error otherwise.
from attachment-lite.
you can view the source code of the models save function...
I already cloned the lucid repo to study to see if it throws somewhere
but as far as I can see the function just returns
return this;
I am trying to see if any of the functions called above throws an error
@thetutlage would be helpful here.
Thanks
from attachment-lite.
Released as 1.0.8
from attachment-lite.
Related Issues (20)
- Allow creation of attachments outside the context of a file sent via HTTP request HOT 1
- No mention on how to create column in database HOT 1
- Unavoidable errors when DB response is `null` HOT 1
- Pre-signed URL saved on model expired HOT 4
- Is there a way to rename saved files? HOT 4
- Can I upload multiple files? HOT 1
- Pre compute URL with expiresIn option. HOT 2
- [Adonis Responsive Attachment] preComputeUrls dosn't work when using Database query HOT 2
- How to use Factory with a model that implements Attachment Lite? HOT 2
- attachementLite.setOptions should override @attachment options HOT 4
- Pre compute on demand not work HOT 7
- Files in temp folder are not deleted after uploading to S3. HOT 1
- Ability to override serialize, prepare and consume options on attachment decorator HOT 2
- `computeUrl` function not working without `preComputeUrl` config set HOT 6
- Image conversion after uploading HOT 5
- Attachment's name is undefined HOT 3
- Error: existingFile.setOptions is not a function
- preComputeUrl is giving out wrong URL
- V6 support HOT 1
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 attachment-lite.