User tests: Successful: Unsuccessful:
This will implement images upload feature.
I will.. try ;)
What do I have to do to make those messages appear ? Where are they defined ??
Turns out I had not updated my branch, now I found the code....
You have to pass the strings to Twigs "raw" filter, or the text will be escaped by default
<li>{{ "Max file size note"|_|raw }}</li>
Yes I would prefer all caps keys like
<li>{{ "MAX_FILE_SIZE_NOTE"|_|raw }}</li>
On the other hand, the texts are not that long, so you might just write them in the code without using a key (including HTML entities..). This way you also won't need the en-GB language file ;)
Maybe:
<li>{{ "The maximum file size for uploading - <strong> 1 MB </strong>."|_|raw }}</li>
But even more important... shouldn't that be a sprintf() and the value coming from some config ?
Ah thanks! Missed that |raw filter.
This way you also won't need the en-GB language file
But I would use CAPS then I should create that manually, right?
shouldn't that be a sprintf() and the value coming from some config ?
Yes I was thinking about it, but then we need to make the config values human readable.
I should create that manually, right?
I think yes... Otherwise we would have to generate english language files for all the Apps.
we need to make the config values human readable.
I think we might just dump them in as they are defined in config... our users are expected to be smart enough to figure out what they mean ![]()
I think we might just dump them in as they are defined in config... our users are expected to be smart enough to figure out what they mean
Do you think this will look good?
Only images are allowed (image/png, image/jpeg, image/gif)
And MB will be simply M...
Do you think this will look good?
You could write a function to replace those image/* things and to convert M to MB but, honestly, I wouldn't bother with those details.
Would be nice to have all those elements hidden in some div... In the end we could live with just the drag & drop thingy.
Are there other issues beside the language? Can we merge this ? (needs update) ![]()
One more tricky thing - do we want all our uploads to be in the same uploads dir? Or these will be in dirs like /uploads/projectID/issueNumber or /uploads/projectID ?
Another "tricky" question: Is there any "clean up job" defined ? -- I mean: search and delete unused media ?
I think it wouldn't be bad to add some "structure", which might also help in "cleanup jobs" like /uploads/projectAlias/issueNumber
Otherwise, what would be the use case for those (sub)directories ?
You are right some clean up job should be defined. And we will definately need a proper structure for it to identify unused media. For me /uploads/projectID/issueNumber is a good option, cause projectAlias can be changed.
issueNumber is a good option, cause projectAlias can be changed.
good point ;)
Well /uploads/projectID/issueNumber will not work :( When we add a new issue we do not know the exact issue number... So we can stick with the /uploads/projectID only. What do you think, do we need the issueNumber for the clean up job? What will be the scenario for this clean up job? In theory an issue should not be deleted, but a project probably can be. So clean up could delete all the media under the specific projectID dir? ![]()
Guys I need your answers here. We need to go forward - more issues are waiting :)
I would say that old issues shouldn't be deleted, so maybe the clean up job is project based.
One idea, and I'm not claiming that it is a good one
, is to upload the file to /uploads/projectID/tmp[Random] and then move it to /uploads/projectID/issueNumber after the issue is saved. [Random] would be a random string generated when you begin creating a new issue.
Long story
So I suppose that /uploads/projectID/ would be enough?
Let's say
and see how it goes ![]()
Ok, now the files are uploaded to the /uploads/projectID/. Note the code does not create upload directories on the fly because it will lead to more complex implementation. Are we ok with creating them manually? Basically you should create something like /uploads/1 and /uploads/2 under www directory.
Cmon guys I know we can do it! Let's finish these waiting PRs and move forward implementing new features and fixing issues ![]()
So after deploying the code to the server, the upload directories have to be created manually ?
So after deploying the code to the server, the upload directories have to be created manually ?
Yeap. The implementation of the auto-creation seems to me now not so complicated and complex, but do we need it? If we would have /uploads/projectID/issueNumber storage then it would make sense.
Erm.. could you update this again? From what I can see only language files and the composer file have been changed ;)
I mean they are conflicting.. sorry.
@mbabker you will need to pull upload scripts with the bower install, otherwise uploads will not work ^_^. And there are changes in the config.json also: uploads directory and validations, so you should create something like /uploads/1 and /uploads/2 under www directory :)
I hope everything will be fine cause I am going to sleep now and will not help ![]()
Updated the server, created the /uploads directory and child directories. Hopefully it isn't broken :-D
Oops, forgot to mention that you need to update deps also :) Trying to upload and get Error 500 -> Class 'Upload\File' not found ![]()
I was working with Rochen on a memory issue with that actually, all's well now and the composer dependencies are now up-to-date.
That's good news - Thanks Rochen ;)
What about Bower - how do you manage to sync those media files ? ...
I'm doing that by FTP.
Well that's... not so good, but I think some more time has to pass until hosting providers are going to offer such advanced tools to their clients ;)
Still can not upload - Directory does not exist... Have you enabled config options: uploads and validations ?
I changed the config to the absolute path and now I'm getting a Empty file upload result error. This might be why though; running composer install on the server gets me: - codeguy/upload dev-master requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
That's bad :( Is there a chance to enable this extension?
It has been explicitly disabled.. see phpinfo:./configure' '--disable-fileinfo'
that sounds very bad
Working on getting it enabled.
On Friday, February 7, 2014, Dmitry Rekun notifications@github.com wrote:
@mbabker https://github.com/mbabker any news on it?
Reply to this email directly or view it on GitHub#251 (comment)
.
Just tried to upload a couple items to this issue on the site (finally got fileinfo enabled) and got Empty file upload result messages on both images (one PNG and one JPG image).
You may blame the J!Tracker Application for transmitting this comment.
That's a generic message. The real error message is in XHR and currently it is:"error":"Directory does not exist"
OK, figured it out. I had the uploads folder in the wrong place in the filesystem. It's good to go.
You may blame the J!Tracker Application for transmitting this comment.
ok, testing uploads :)
You may blame the J!Tracker Application for transmitting this comment.
Current issues (@elkuku I will need your help here):