Comments (10)
server must respond with code 201 to the post request.
Probably should:
ServletUtil.createLocation("ngx-upload/"+metadata.getUniqueId()), HttpStatus.CREATED);
from ngx-uploadx.
send chunk: 2
...
HTTP/1.1 308 Resume Incomplete
Range: bytes=2097152-4194303 - error here, should be Range: bytes=0-4194303
Content-Length: 0
from ngx-uploadx.
LocalStorage -> UPLOADX-V3.0-xxx key.
I'll do a less restrictive range check.
from ngx-uploadx.
the file is hashed twice before and after upload. And the hash is not checked on the server. I don't think that's very good.
It's possible to do that:
async sendFileContent(): Promise<number | undefined> {
const { end, body } = this.getChunk();
const chunkHash = await this.hasher.hash(body);
const headers = {
'Content-Type': 'application/octet-stream',
'Content-Range': `bytes ${this.offset}-${end - 1}/${this.size}`,
'Chunk-md5': chunkHash
};
await this.request({ method: 'PUT', body, headers });
return this.getOffsetFromResponse();
}
from ngx-uploadx.
When i change HttpStatus to CREATED
i can post Upload file
but not put file
image: https://s3-ap-southeast-1.amazonaws.com/img-in-th/49ef3549f41be39385a1d65af829d4de.png
from ngx-uploadx.
REQUESTS OVERVIEW
create:
POST http://localhost:8000/upload-file
Content-Type: application/json; charset=UTF-8
X-Upload-Content-Length: 13057291
X-Upload-Content-Type: video/mp4
{"name":"file.MP4","mimeType":"video/mp4","size":13057291,"lastModified":1547276404709,"uploadId":"8d03d7e3"}
HTTP/1.1 201 Created
Location: upload-file/f38b082c-dbc6-4f8c-bb47-e9acb1a5338a
Content-Length: 0
send chunk: 1
PUT http://localhost:8000/upload-file/f38b082c-dbc6-4f8c-bb47-e9acb1a5338a
Content-Type: application/octet-stream
Content-Range: bytes 0-2097151/13057291
Content-Length: 2097152
[BYTES 0-2097151]
HTTP/1.1 308 Resume Incomplete
Range: bytes=0-2097151
Content-Length: 0
send chunk: 2
PUT http://localhost:8000/upload-file/f38b082c-dbc6-4f8c-bb47-e9acb1a5338a
Content-Type: application/octet-stream
Content-Range: bytes 2097152-4194303/13057291
Content-Length: 2097152
[BYTES 2097152-4194303]
HTTP/1.1 308 Resume Incomplete
Range: bytes=2097152-4194303
Content-Length: 0
But !!!
send chunk: 3
PUT http://localhost:8000/upload-file/f38b082c-dbc6-4f8c-bb47-e9acb1a5338a
Content-Type: application/octet-stream
**Content-Range: bytes 0-2097151/13057291**
Content-Length: 2097152
[BYTES 0-2097151]
HTTP/1.1 308 Resume Incomplete
**Range: bytes=0-2097151**
Content-Length: 0
from ngx-uploadx.
I'm stamp log in database
image : https://s3-ap-southeast-1.amazonaws.com/img-in-th/d8cd5034a7f1bff27b7766626d6661a5.png
from ngx-uploadx.
Some file upload error because send Content-Range: bytes */3000
,
How do I clear the cache of files that I uploaded?
from ngx-uploadx.
I would like a sample (back-end java spring-boot) about file integration. When all uploads are complete,
in code filer.component.ts line 104-115,
Do I need to create an hash? (gen hash, send hash to back-end)
Or if you can't answer me, that's okay.
I understand that you made for Angular.
from ngx-uploadx.
Thank you very much,
I can now make my program upload chuck files and merge files.
from ngx-uploadx.
Related Issues (20)
- Uploading of same file simultaneously in two different tabs of same window is failing HOT 3
- Window is not defind with Server Side Rendering HOT 1
- Location Error HOT 5
- Infinite retries upon 500 response HOT 4
- Feature request: maxChunkSize HOT 2
- Chunk timeout HOT 4
- Big files upload error with iOS HOT 3
- dynamic directive id HOT 1
- How is re-uploading resumed? HOT 2
- uploading the same file should be faster HOT 4
- why not use real filename for completed uploading HOT 2
- custom metadata is not working well HOT 2
- How to confirm before uploading via drop and drop HOT 2
- Support Angular 13 HOT 1
- How to append additional params to the request (service)? HOT 1
- throw error on using ngx-uploadx and uploadx-server with s3 HOT 1
- How to handle complete response HOT 2
- Drag and drop directory for upload
- Release date of next version HOT 1
- missing Metadata member HOT 2
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 ngx-uploadx.