Comments (3)
I'll investigate it more details tomorrow and eventually will consider preserving double extensions.
from pocketbase.
I've pushed a fix in master
to take double extensions in consideration and it will be available with the next minor v0.22.10 release (most likely tomorrow or the day following it).
Regarding the hook, __hooks
is a string and doesn't have StopPropagation
field. To stop the hook chain in the JSVM you need to either throw an error OR return false
(note that the hooks will slightly change with the refactoring).
from pocketbase.
@ganigeorgiev thank you for your quick response. In the meantime, I've found the code snippet for changing the filename on the fly using hook in #306 (comment)
I'm trying to translate it to Javascript without success.
This is what I had so far:
onFileDownloadRequest((e) => {
fs = $app.newFilesystem();
fs.serve(e.httpContext.response(), e.servedPath, "test.zip");
fs.close();
return __hooks.StopPropagation;
});
Any tips?
from pocketbase.
Related Issues (20)
- `$os.readFile` and `$os.getwd` use `/` as working directory in production enviroment HOT 4
- Feature Request: is there is any way to make our own Custome storage system. HOT 1
- Proposal: Switch to LumoSQL HOT 1
- Issue with Hour Field Not Triggering in CronJob Registration HOT 1
- Querying Auth Record from a PB Hook does not return the email field, if the user has emailVisibility set to false HOT 1
- Extending with JS: Object access within DynamicModel not ergonomic? HOT 2
- How to expand ModelQuery results?
- JSON fields not showing in admin item drill-down HOT 2
- Problem with operator: `?=` HOT 2
- Admin interface loads slowly because of the created field HOT 1
- How can I filter a date using the equal = operator ? HOT 2
- Is it possible to clear out all records leaving the structure intact?
- Proposal: Add a POST log's route HOT 3
- Is it possible to override default console output
- Proposal: automatically load custom certificates from /pb_certificates HOT 1
- [Feature] Add a 'Duplicate' option to the selected record in the Admin UI HOT 1
- Feature Request: RSA Token/ minting record in token for M2M auth HOT 1
- Cross joins not working in view collections HOT 7
- Sending multiple emails in one cron hook was not completed without error message HOT 3
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 pocketbase.