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

Date upload (web/client/...) #32916

Closed
antoine15 opened this issue Sep 29, 2018 · 7 comments
Closed

Date upload (web/client/...) #32916

antoine15 opened this issue Sep 29, 2018 · 7 comments

Comments

@antoine15
Copy link

Hello,

I updated the new server 10.* and now, when user send a file, the modify date is the a really modify date ... but i prefer had the upload date, same was with server version 9.*

Thks for your help :)

@ownclouders
Copy link
Contributor

GitMate.io thinks possibly related issues are #5326 (web dav chunked upload tasks), #26895 (web navigation), #18166 (Upload deduplication), #8105 (Enhancement: Show "time left" during upload in Web UI.), and #21762 (Modified date - Uploaded date).

@antoine15
Copy link
Author

Hello,

Thanks for your answere,
But can you more specific ?
I don't understand ... i can't modify param / conf for solved my problem ?

@antoine15
Copy link
Author

Please nobody can help me ? ='(

@IljaN
Copy link
Contributor

IljaN commented Oct 26, 2018

I don't think that there is a setting for this. Also please use https://central.owncloud.org/ for support questions you probably will get a quicker answer there as this is an issue/bug tracker.

@Perfecticus
Copy link

Perfecticus commented Feb 11, 2020

I thought I'd just leave a comment here as I encountered the problem of not having the uploaded files marked with upload date in the file system, making it harder to know which files to process for generating thumbnails.

I dug into the code and found where I needed to make a change in order to have the upload time as modified date.

apps/files/js/file-upload.js

find this

            if (lastModified) {
                    // preserve timestamp
                    this.data.headers['X-OC-Mtime'] = '' + lastModified;
            }

and comment out the assign of data.headers like so:
// this.data.headers['X-OC-Mtime'] = '' + lastModified;

Another more robust way of doing it (due to client js caching) is adjusting the Sabre file handler.

apps/dav/lib/Connector/Sabre/File.php

find this

    private function handleMetadataUpdate(\OC\Files\Storage\Storage $targetStorage, $targetInternalPath) {
            // since we skipped the view we need to scan and emit the hooks ourselves

            // allow sync clients to send the mtime along in a header
            if (isset($this->request->server['HTTP_X_OC_MTIME'])) {

And adjust the if statement to
if (false && isset($this->request->server['HTTP_X_OC_MTIME'])) {

@stale
Copy link

stale bot commented Sep 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/STALE label Sep 19, 2021
@stale
Copy link

stale bot commented Sep 20, 2021

This issue has been automatically closed.

@stale stale bot closed this as completed Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants