Comments (3)
It turns out that we can already do this with the current implementation, here is how:
@Post('azure/upload')
@UseInterceptors(FileInterceptor('file'))
async UploadedFilesUsingService(
@UploadedFile()
file: UploadedFileMetadata,
) {
file = {
...file,
originalname: 'foo-bar.txt',
};
const storageUrl = await this.azureStorage.upload(file, {
containerName: 'nest-demo-container-service',
});
Logger.log(`Storage URL: ${storageUrl}`, 'AppController');
}```
I will add this to the readme.
from azure-storage.
How do you specify the folder though? I tried uploading a file with the name "folder/filename.ext" and it created a file literally named "folder/filename.ext" instead of the folder "folder" and the filename.ext inside.
from azure-storage.
I am sorry. Folder creation is not supported yet. Would you mind creating a different issue or a feature request to track this?
from azure-storage.
Related Issues (20)
- NestJS 7 support HOT 2
- Semi PR Request (upgrades in azure library) HOT 3
- How can I delete an image from Azure Storage Container? HOT 2
- I can't install this package with npm@7 HOT 4
- Error encountered: 404 HOT 1
- Accessing Azure SDK Method using this module
- Could not resolve dependency HOT 1
- Dependency Dashboard
- Change UploadedFileMetaData interface's size property to number from string type.
- Add command isn't working as expected HOT 3
- Upload: reject promise when Azure errors
- Cannot set properties of undefined (setting 'start:azure')
- Dependency issue HOT 3
- Using AzureStorageModule in different modules overrides one another's config HOT 1
- Update dependencies
- Add forRootAsync for configuration via configService HOT 3
- Add folder creation support HOT 1
- Add SAS Key generation service HOT 2
- Validate the SAS key format
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 azure-storage.