Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TUS] Return metadata headers after direct upload #813

Merged
merged 1 commit into from
Jun 10, 2020
Merged

[TUS] Return metadata headers after direct upload #813

merged 1 commit into from
Jun 10, 2020

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Jun 9, 2020

When uploading the full file using POST with the TUS extension
"creation-with-upload", the fileid, etag and mtime are now returned
through headers.

I've tested this using owncloud/web#3436

  • TEST: upload full file returns metadata
  • TEST: upload chunked file (where first chunk is sent with POST) does not return metadata

@butonic

When uploading the full file using POST with the TUS extension
"creation-with-upload", the fileid, etag and mtime are now returned
through headers.
@TheOneRing
Copy link
Contributor

🥳

06-09 15:43:45:108 [ info sync.httplogger ]:	"4223e8ce-ce6c-4cfe-aec5-5965168fe054: Request: POST https://localhost:9200/remote.php/dav/files/einstein/ Header: { X-OC-Mtime: 1591690593, Content-Type: application/offset+octet-stream, Content-Length: 63636544, Upload-Length: 63636544, Upload-Offset: 0, Tus-Resumable: 1.0.0, Upload-Metadata: filename a2F0ZS0yMC4wNC4xLTg2Ny1tYWNvcy02NC1jbGFuZyBjb3B5LmRtZw==,dir Lg==,checksum U0hBMjU2IDFhYjJkNTE2YWM2MjBkZTIxZjU5MTg5NTk4M2M3NmZkZTNiYzViZWM3ZGNhYmFhM2FhYTRkYzAzMjA0NDQ5M2I=, Authorization: [redacted], User-Agent: Mozilla/5.0 (Macintosh) mirall/2.7.0git (ownCloud, osx-19.4.0 ClientArchitecture: x86_64 OsArchitecture: x86_64), Accept: */*, X-Request-ID: 4223e8ce-ce6c-4cfe-aec5-5965168fe054, } Data: [63636544 bytes of application/offset+octet-stream data]"
06-09 15:43:45:513 [ info sync.httplogger ]:	"4223e8ce-ce6c-4cfe-aec5-5965168fe054: Response: POST https://localhost:9200/remote.php/dav/files/einstein/ Header: { Access-Control-Allow-Headers: Tus-Resumable, Upload-Length, Upload-Metadata, If-Match, Access-Control-Allow-Origin: *, Access-Control-Expose-Headers: Tus-Resumable, Location, Content-Length: 0, Content-Security-Policy: default-src 'none';, Content-Type: application/x-apple-diskimage, Date: Tue, 09 Jun 2020 13:43:45 GMT, Etag: \"427de40897c6fec5b27fe287a37503b7\", Last-Modified: Tue, 09 Jun 2020 15:43:45 +0200, Location: http://localhost:9164/data/0becdc4f-9091-45a3-9905-caad6b69cfe3, Oc-Etag: \"427de40897c6fec5b27fe287a37503b7\", Oc-Fileid: MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTYyOmU1NzU1ZmY0LTdhM2ItNDJmYS1iZTlmLWVkYmJhYjU0OGVlMw==, Tus-Resumable: 1.0.0, Upload-Offset: 63636544, Vary: Origin, X-Access-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTkxNzEzODI1LCJpYXQiOjE1OTE3MTAyMjUsImlzcyI6Imh0dHBzOi8vbG9jYWxob3N0OjkyMDAiLCJ1c2VyIjp7ImlkIjp7ImlkcCI6Imh0dHBzOi8vbG9jYWxob3N0OjkyMDAiLCJvcGFxdWVfaWQiOiJlaW5zdGVpbiJ9LCJ1c2VybmFtZSI6ImVpbnN0ZWluIiwibWFpbCI6ImVpbnN0ZWluQGV4YW1wbGUub3JnIiwiZGlzcGxheV9uYW1lIjoiRWluc3RlaW4ifX0.HLnG5ewBltjGzOjYhGPTJF7tSAtnYXhoE4R_AiOUKIc, X-Content-Type-Options: nosniff, X-Download-Options: noopen, X-Frame-Options: SAMEORIGIN, X-Permitted-Cross-Domain-Policies: none, X-Robots-Tag: none, X-Xss-Protection: 1; mode=block, } Data: []"

@labkode labkode merged commit 4d70198 into cs3org:master Jun 10, 2020
C0rby pushed a commit to owncloud/reva that referenced this pull request Jun 30, 2020
When uploading the full file using POST with the TUS extension
"creation-with-upload", the fileid, etag and mtime are now returned
through headers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants